diff options
author | Emma Foley <emma.l.foley@intel.com> | 2018-01-10 10:48:29 +0000 |
---|---|---|
committer | Emma Foley <emma.l.foley@intel.com> | 2018-01-25 20:03:46 +0000 |
commit | 44ee5e004f3af5dcdbbc1d172faba91b8419b6d6 (patch) | |
tree | f81cd5a5af0f267f981339d9ac0d4eba5c666264 /tests/unit/network_services | |
parent | e67082ecf9c89eeebbdf2c87b0a90e3edef2eabd (diff) |
Make files pep8 compliant before using assertTrue|False
JIRA: YARDSTICK-903
Signed-off-by: Emma Foley <emma.l.foley@intel.com>
Change-Id: Id7912b5ddee36e7366bcfa824379853efd0a89f1
Diffstat (limited to 'tests/unit/network_services')
-rw-r--r-- | tests/unit/network_services/nfvi/test_resource.py | 11 | ||||
-rw-r--r-- | tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py | 3 |
2 files changed, 6 insertions, 8 deletions
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") diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py index 63b2ac4ab..8bf589281 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py @@ -282,8 +282,7 @@ class TestPingTrafficGen(unittest.TestCase): self.assertEqual(self.CMD_KWARGS, ping_traffic_gen.resource_helper.cmd_kwargs) self.assertIsNotNone(ping_traffic_gen._result) - @mock.patch("yardstick.ssh.SSH") - def test_listen_traffic(self, *args): + def test_listen_traffic(self): ping_traffic_gen = PingTrafficGen('vnf1', self.VNFD_0) self.assertIsNone(ping_traffic_gen.listen_traffic({})) |