Skip to content

Commit

Permalink
Improve things in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Bragg committed Jul 18, 2016
1 parent ad5f9b6 commit a2ec8b3
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions master/buildbot/test/unit/test_reporter_bitbucket.py
Expand Up @@ -14,6 +14,7 @@
# Copyright Buildbot Team Members
from mock import Mock
from mock import call

from twisted.internet import defer
from twisted.trial import unittest

Expand Down Expand Up @@ -67,15 +68,15 @@ def test_basic(self):
data={'grant_type': 'client_credentials'}),
call(u'https://api.bitbucket.org/2.0/repositories/repo/repo/commit/d34db33fd43db33f/statuses/build',
json={'url': 'http://localhost:8080/#builders/79/builds/0',
'state': 'INPROGRESS', 'key': u'Builder0', 'name': u'Builder0'}),
'state': 'INPROGRESS', 'key': u'Builder0', 'name': u'Builder0'}),
call('https://bitbucket.org/site/oauth2/access_token', auth=('key', 'secret'),
data={'grant_type': 'client_credentials'}),
data={'grant_type': 'client_credentials'}),
call(u'https://api.bitbucket.org/2.0/repositories/repo/repo/commit/d34db33fd43db33f/statuses/build',
json={'url': 'http://localhost:8080/#builders/79/builds/0',
'state': 'SUCCESSFUL', 'key': u'Builder0', 'name': u'Builder0'}),
json={'url': 'http://localhost:8080/#builders/79/builds/0',
'state': 'SUCCESSFUL', 'key': u'Builder0', 'name': u'Builder0'}),
call('https://bitbucket.org/site/oauth2/access_token', auth=('key', 'secret'),
data={'grant_type': 'client_credentials'}),
data={'grant_type': 'client_credentials'}),
call(u'https://api.bitbucket.org/2.0/repositories/repo/repo/commit/d34db33fd43db33f/statuses/build',
json={'url': 'http://localhost:8080/#builders/79/builds/0',
'state': 'FAILED', 'key': u'Builder0', 'name': u'Builder0'})
json={'url': 'http://localhost:8080/#builders/79/builds/0',
'state': 'FAILED', 'key': u'Builder0', 'name': u'Builder0'})
])

0 comments on commit a2ec8b3

Please sign in to comment.