diff options
Diffstat (limited to 'tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py')
-rw-r--r-- | tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py index f62a0fb3b..e9f718cb7 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py @@ -15,8 +15,6 @@ # limitations under the License. # -from __future__ import absolute_import - import os import unittest import mock @@ -40,14 +38,14 @@ NAME = "tg__1" @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_rfc2544_ixia.IxNextgen") class TestIxiaResourceHelper(unittest.TestCase): - def test___init___with_custom_rfc_helper(self, mock_ix_nextgen): + def test___init___with_custom_rfc_helper(self, *args): class MyRfcHelper(IxiaRfc2544Helper): pass ixia_resource_helper = IxiaResourceHelper(mock.Mock(), MyRfcHelper) self.assertIsInstance(ixia_resource_helper.rfc_helper, MyRfcHelper) - def test_stop_collect_with_client(self, mock_ix_nextgen): + def test_stop_collect_with_client(self, *args): mock_client = mock.Mock() ixia_resource_helper = IxiaResourceHelper(mock.Mock()) @@ -154,16 +152,17 @@ class TestIXIATrafficGen(unittest.TestCase): 'file': '/etc/yardstick/nodes/pod.yaml'}, 'schema': 'yardstick:task:0.1'} - def test___init__(self, mock_ixnextgen): + def test___init__(self, *args): with mock.patch("yardstick.ssh.SSH") as ssh: ssh_mock = mock.Mock(autospec=ssh.SSH) ssh_mock.execute = \ mock.Mock(return_value=(0, "", "")) ssh.from_node.return_value = ssh_mock vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] - ixnet_traffic_gen = IxiaTrafficGen(NAME, vnfd) + # NOTE(ralonsoh): check the object returned. + IxiaTrafficGen(NAME, vnfd) - def test_listen_traffic(self, mock_ixnextgen): + def test_listen_traffic(self, *args): with mock.patch("yardstick.ssh.SSH") as ssh: ssh_mock = mock.Mock(autospec=ssh.SSH) ssh_mock.execute = \ @@ -173,7 +172,7 @@ class TestIXIATrafficGen(unittest.TestCase): ixnet_traffic_gen = IxiaTrafficGen(NAME, vnfd) self.assertEqual(None, ixnet_traffic_gen.listen_traffic({})) - def test_instantiate(self, mock_ixnextgen): + def test_instantiate(self, *args): with mock.patch("yardstick.ssh.SSH") as ssh: ssh_mock = mock.Mock(autospec=ssh.SSH) ssh_mock.execute = \ @@ -203,7 +202,7 @@ class TestIXIATrafficGen(unittest.TestCase): IOError, ixnet_traffic_gen.instantiate(scenario_cfg, {})) - def test_collect_kpi(self, mock_ixnextgen): + def test_collect_kpi(self, *args): with mock.patch("yardstick.ssh.SSH") as ssh: ssh_mock = mock.Mock(autospec=ssh.SSH) ssh_mock.execute = \ @@ -215,7 +214,7 @@ class TestIXIATrafficGen(unittest.TestCase): restult = ixnet_traffic_gen.collect_kpi() self.assertEqual({}, restult) - def test_terminate(self, mock_ixnextgen): + def test_terminate(self, *args): with mock.patch("yardstick.ssh.SSH") as ssh: vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] ssh_mock = mock.Mock(autospec=ssh.SSH) @@ -236,19 +235,14 @@ class TestIXIATrafficGen(unittest.TestCase): file_path = os.path.join(curr_path, filename) return file_path - def test_scale(self, mock_ix_nextgen): - vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] - sut = IxiaTrafficGen('vnf1', vnfd) - sut.scale() - - def test__check_status(self, mock_ix_nextgen): + def test__check_status(self, *args): vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] sut = IxiaTrafficGen('vnf1', vnfd) sut._check_status() @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_rfc2544_ixia.time") @mock.patch("yardstick.ssh.SSH") - def test_traffic_runner(self, mock_ixnextgen, mock_ssh, mock_time): + def test_traffic_runner(self, mock_ssh, *args): mock_traffic_profile = mock.Mock(autospec=TrafficProfile) mock_traffic_profile.get_traffic_definition.return_value = "64" mock_traffic_profile.params = self.TRAFFIC_PROFILE |