aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/network_services
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/network_services')
-rw-r--r--tests/unit/network_services/nfvi/test_resource.py11
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py3
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({}))