diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-01-26 09:49:49 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-01-26 15:56:30 +0100 |
commit | 01efa1e4229157b46d352bce202ed4192992dd3f (patch) | |
tree | 7544230a1ab504b1b5458f2e96c31476aa6d5293 /functest/tests/unit/vnf | |
parent | bbfe9b09d2b1ac7bfe286311fef83d36c6125c96 (diff) |
Fix last Pylint error in Functest
It also fixes all pylint warnings in router and the related unit
tests. tox.ini is updated to ensure that no error is introduced.
Change-Id: Iddd74b0dac7b6581d72b04369140006c9e19f998
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/tests/unit/vnf')
-rw-r--r-- | functest/tests/unit/vnf/router/test_cloudify_vrouter.py | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/functest/tests/unit/vnf/router/test_cloudify_vrouter.py b/functest/tests/unit/vnf/router/test_cloudify_vrouter.py index 2e24e7e9..9711da72 100644 --- a/functest/tests/unit/vnf/router/test_cloudify_vrouter.py +++ b/functest/tests/unit/vnf/router/test_cloudify_vrouter.py @@ -20,11 +20,7 @@ from functest.opnfv_tests.vnf.router import cloudify_vrouter class CloudifyVrouterTesting(unittest.TestCase): - @mock.patch('functest.opnfv_tests.vnf.router.cloudify_vrouter.Utilvnf') - @mock.patch('functest.opnfv_tests.vnf.router.cloudify_vrouter.vrouter_base' - '.Utilvnf') - @mock.patch('os.makedirs') - def setUp(self, *args): + def setUp(self): self.tenant = 'cloudify_vrouter' self.creds = {'username': 'user', @@ -46,13 +42,20 @@ class CloudifyVrouterTesting(unittest.TestCase): {'name': 'm1.medium', 'ram_min': 2048}}}} - with mock.patch('functest.opnfv_tests.vnf.router.cloudify_vrouter.' - 'get_config', return_value={ - 'tenant_images': 'foo', - 'orchestrator': self.orchestrator, - 'vnf': self.vnf, - 'vnf_test_suite': '', - 'version': 'whatever'}): + # pylint: disable=bad-continuation + with mock.patch( + 'functest.opnfv_tests.vnf.router.cloudify_vrouter.Utilvnf'), \ + mock.patch('functest.opnfv_tests.vnf.router.' + 'cloudify_vrouter.vrouter_base.Utilvnf'), \ + mock.patch('os.makedirs'), \ + mock.patch( + 'functest.opnfv_tests.vnf.router.cloudify_vrouter.' + 'get_config', + return_value={ + 'tenant_images': 'foo', + 'orchestrator': self.orchestrator, + 'vnf': self.vnf, 'vnf_test_suite': '', + 'version': 'whatever'}): self.router_vnf = cloudify_vrouter.CloudifyVrouter() |