Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Update
python-flake8
flake8-fix-tests-using-new-mock.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File flake8-fix-tests-using-new-mock.patch of Package python-flake8
From b0f30f97fbec04c1ab7cb8937f636822eab63885 Mon Sep 17 00:00:00 2001 From: Ian Cordasco <graffatcolmingov@gmail.com> Date: Fri, 10 Jul 2015 09:34:49 -0500 Subject: [PATCH] Fix flake8 tests using mock to work with 1.1.x branch --- a/flake8/tests/test_engine.py +++ b/flake8/tests/test_engine.py @@ -51,7 +51,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 @@ -66,13 +66,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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor