Skip to content

Commit

Permalink
replace vacuuous mock.assert_called with mock.assert_called_with()
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Apr 17, 2014
1 parent 67e8d08 commit 0a2ffe5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion master/buildbot/test/unit/test_schedulers_basic.py
Expand Up @@ -162,7 +162,7 @@ def test_activate_calls_preStartConsumingChanges(self):

@d.addCallback
def check(_):
sched.preStartConsumingChanges.assert_called()
sched.preStartConsumingChanges.assert_called_with()
return d

def test_gotChange_no_treeStableTimer_unimportant(self):
Expand Down
4 changes: 2 additions & 2 deletions master/buildbot/test/unit/test_www_auth.py
Expand Up @@ -196,7 +196,7 @@ def updateUserInfo(request):
res = yield self.render_resource(self.rsrc, '/auth/login')
self.assertEqual(res, "")
self.failIf(self.auth.maybeAutoLogin.called)
self.auth.updateUserInfo.assert_called()
self.auth.updateUserInfo.assert_called_with(mock.ANY)
self.assertEqual(self.master.session.user_info,
{'email': 'him@org', 'username': 'him'})

Expand All @@ -212,4 +212,4 @@ def test_render(self):
self.master.session.expire = mock.Mock()
res = yield self.render_resource(self.rsrc, '/auth/logout')
self.assertEqual(res, "")
self.master.session.expire.assert_called()
self.master.session.expire.assert_called_with()
2 changes: 1 addition & 1 deletion master/buildbot/test/unit/test_www_config.py
Expand Up @@ -33,7 +33,7 @@ def test_render(self):
rsrc.reconfigResource(master.config)

res = yield self.render_resource(rsrc, '/')
_auth.maybeAutoLogin.assert_called()
_auth.maybeAutoLogin.assert_called_with(mock.ANY)
exp = 'this.config = {"url": "h:/a/b/", "user": {"anonymous": true}, "auth": {"name": "NoAuth"}, "port": null}'
self.assertEqual(res, exp)

Expand Down

0 comments on commit 0a2ffe5

Please sign in to comment.