From 44ee5e004f3af5dcdbbc1d172faba91b8419b6d6 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Wed, 10 Jan 2018 10:48:29 +0000 Subject: Make files pep8 compliant before using assertTrue|False JIRA: YARDSTICK-903 Signed-off-by: Emma Foley Change-Id: Id7912b5ddee36e7366bcfa824379853efd0a89f1 --- tests/unit/network_services/nfvi/test_resource.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tests/unit/network_services/nfvi') diff --git a/tests/unit/network_services/nfvi/test_resource.py b/tests/unit/network_services/nfvi/test_resource.py index 4584b093d..2f953f227 100644 --- a/tests/unit/network_services/nfvi/test_resource.py +++ b/tests/unit/network_services/nfvi/test_resource.py @@ -136,11 +136,12 @@ class TestResourceProfile(unittest.TestCase): self.resource_profile._prepare_collectd_conf("/opt/nsb_bin")) def test__setup_ovs_stats(self): + # TODO(elfoley): This method doesn't actually return anything, the side + # effects should be checked self.assertIsNone( self.resource_profile._setup_ovs_stats(self.ssh_mock)) - @mock.patch("yardstick.network_services.nfvi.resource.open") - def test__provide_config_file(self, *args): + def test__provide_config_file(self,): loadplugin = range(5) port_names = range(5) kwargs = { @@ -151,14 +152,12 @@ class TestResourceProfile(unittest.TestCase): self.resource_profile._provide_config_file("/opt/nsb_bin", "collectd.conf", kwargs) self.ssh_mock.execute.assert_called_once() - @mock.patch("yardstick.network_services.nfvi.resource.open") - def test_initiate_systemagent(self, *args): + def test_initiate_systemagent(self): self.resource_profile._start_collectd = mock.Mock() self.assertIsNone( self.resource_profile.initiate_systemagent("/opt/nsb_bin")) - @mock.patch("yardstick.network_services.nfvi.resource.open") - def test_initiate_systemagent_raise(self, *args): + def test_initiate_systemagent_raise(self): self.resource_profile._start_collectd = mock.Mock(side_effect=RuntimeError) with self.assertRaises(RuntimeError): self.resource_profile.initiate_systemagent("/opt/nsb_bin") -- cgit 1.2.3-korg