diff options
author | kongr45gpen <electrovesta@gmail.com> | 2017-05-07 14:58:56 +0300 |
---|---|---|
committer | kongr45gpen <electrovesta@gmail.com> | 2017-05-07 15:10:57 +0300 |
commit | ec801bbfbb3272a55cd5ad041fc94a9c7d2ff797 (patch) | |
tree | fc5a29e080fef2f54623e866e335d833e8a2a905 | |
parent | 03aad42d43471714aba380159b2e68ef1ac2d4a7 (diff) | |
download | supybot_github-ec801bbfbb3272a55cd5ad041fc94a9c7d2ff797.tar.gz supybot_github-ec801bbfbb3272a55cd5ad041fc94a9c7d2ff797.tar.bz2 supybot_github-ec801bbfbb3272a55cd5ad041fc94a9c7d2ff797.zip |
Add a netlify test
-rw-r--r-- | local/handler/NetlifyHandler.py | 2 | ||||
-rw-r--r-- | local/theme/DefaultTheme.py | 4 | ||||
-rw-r--r-- | test.py | 10 |
3 files changed, 13 insertions, 3 deletions
diff --git a/local/handler/NetlifyHandler.py b/local/handler/NetlifyHandler.py index daa802f..614e067 100644 --- a/local/handler/NetlifyHandler.py +++ b/local/handler/NetlifyHandler.py @@ -9,5 +9,5 @@ def handle(data, theme): commitId = data['commit_ref'], commitMessage = data['title'], commitAuthor = data['commit_url'].split('/')[3], #TODO: Make this show the proper author - url = getShortURL(data['url']) + url = getShortURL(data['deploy_url']) ) diff --git a/local/theme/DefaultTheme.py b/local/theme/DefaultTheme.py index 096311c..4215f51 100644 --- a/local/theme/DefaultTheme.py +++ b/local/theme/DefaultTheme.py @@ -162,7 +162,7 @@ class DefaultTheme(Theme): )) def deployment(self, branch, repo, status, commitId, commitMessage, commitAuthor, url): - self.msgs.append( "%s @ %s: Deployment status: %s * %s by %s %s") % ( + self.msgs.append( "%s @ %s: Deployment status: %s * %s by %s %s" % ( ircutils.bold(ircutils.mircColor(branch, "blue")), ircutils.bold(repo), colorAction(status.lower()), @@ -172,7 +172,7 @@ class DefaultTheme(Theme): ircutils.mircColor(maxLen(commitMessage, 50), "dark gray"), url )) - ) + )) def status(self, status, description, url): self.msgs.append( "%s: %s - %s %s" % ( @@ -122,6 +122,16 @@ class GithubTestCase(ExpectationPluginTestCase): self.assertError('get second message') + def testNetlify(self): + self.sendRequest('netlify-ready') + + self.describe('first message', + it().should.contain('master @ bzflag-plugin-starter'), + it().should.contain('ready'), + it().should.contain('19a67'), + it().should.contain('iisgood') + ) + def testCreateTag(self): self.sendRequest('create-tag') |