Import "traffic_profile" modules only once
[yardstick.git] / tests / unit / network_services / vnf_generic / vnf / test_tg_rfc2544_trex.py
index 6f2a944..7342cfc 100644 (file)
@@ -24,7 +24,6 @@ from tests.unit import STL_MOCKS
 SSH_HELPER = 'yardstick.network_services.vnf_generic.vnf.sample_vnf.VnfSshHelper'
 
 
-
 STLClient = mock.MagicMock()
 stl_patch = mock.patch.dict("sys.modules", STL_MOCKS)
 stl_patch.start()
@@ -101,8 +100,8 @@ class TestTrexTrafficGenRFC(unittest.TestCase):
                             'local_ip': '152.16.100.19',
                             'type': 'PCI-PASSTHROUGH',
                             'netmask': '255.255.255.0',
-                            'vld_id': 'private_1',
-                            'dpdk_port_num': '0',
+                            'vld_id': 'uplink_0',
+                            'dpdk_port_num': 0,
                             'bandwidth': '10 Gbps',
                             'driver': "i40e",
                             'dst_ip': '152.16.100.20',
@@ -121,8 +120,8 @@ class TestTrexTrafficGenRFC(unittest.TestCase):
                             'type': 'PCI-PASSTHROUGH',
                             'driver': "i40e",
                             'netmask': '255.255.255.0',
-                            'vld_id': 'public_1',
-                            'dpdk_port_num': '1',
+                            'vld_id': 'downlink_0',
+                            'dpdk_port_num': 1,
                             'bandwidth': '10 Gbps',
                             'dst_ip': '152.16.40.20',
                             'local_iface_name': 'xe1',
@@ -332,15 +331,6 @@ class TestTrexTrafficGenRFC(unittest.TestCase):
         trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock()
         self.assertIsNone(trex_traffic_gen.resource_helper.generate_cfg())
 
-    def test_scale(self):
-        with mock.patch(SSH_HELPER) as ssh:
-            ssh_mock = mock.Mock(autospec=ssh.SSH)
-            ssh_mock.execute = mock.Mock(return_value=(0, "", ""))
-            ssh_mock.run = mock.Mock(return_value=(0, "", ""))
-            ssh.from_node.return_value = ssh_mock
-            trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0)
-            trex_traffic_gen.scale('')
-
     def test_terminate(self):
         with mock.patch(SSH_HELPER) as ssh:
             ssh_mock = mock.Mock(autospec=ssh.SSH)