Fix flake8 tests using mock to work with 1.1.x branch

This commit is contained in:
Ian Cordasco 2015-07-10 09:34:49 -05:00
parent b827629b7a
commit b0f30f97fb
2 changed files with 6 additions and 6 deletions

View file

@ -52,7 +52,7 @@ class TestEngine(unittest.TestCase):
self.assertTrue(len(registered_exts[0]) > 0)
for i in registered_exts[1:]:
self.assertTrue(isinstance(i, list))
register_check.assert_called()
self.assertTrue(register_check.called)
def test_get_parser(self):
# setup
@ -67,13 +67,13 @@ class TestEngine(unittest.TestCase):
# actual call we're testing
parser, hooks = engine.get_parser()
# assertions
re.assert_called()
gpv.assert_called()
self.assertTrue(re.called)
self.assertTrue(gpv.called)
pgp.assert_called_once_with(
'flake8',
'%s (pyflakes: 0.7, mccabe: 0.2) Python Version' % __version__)
m.remove_option.assert_called()
m.add_option.assert_called()
self.assertTrue(m.remove_option.called)
self.assertTrue(m.add_option.called)
self.assertEqual(parser, m)
self.assertEqual(hooks, [])
# clean-up

View file

@ -6,7 +6,7 @@ envlist =
[testenv]
usedevelop = True
deps =
mock<1.1.0
mock
nose
commands =
python setup.py test -q