Merge "Import "traffic_profile" modules only once"
[yardstick.git] / tests / unit / network_services / vnf_generic / vnf / test_vfw_vnf.py
index d128db0..f2eca19 100644 (file)
@@ -22,6 +22,9 @@ import os
 from tests.unit import STL_MOCKS
 from tests.unit.network_services.vnf_generic.vnf.test_base import mock_ssh
 
+from yardstick.common import utils
+
+
 STLClient = mock.MagicMock()
 stl_patch = mock.patch.dict("sys.modules", STL_MOCKS)
 stl_patch.start()
@@ -331,7 +334,7 @@ pipeline>
         vfw_approx_vnf._run()
         vfw_approx_vnf.ssh_helper.run.assert_called_once()
 
-    @mock.patch("yardstick.network_services.vnf_generic.vnf.vfw_vnf.find_relative_file")
+    @mock.patch.object(utils, 'find_relative_file')
     @mock.patch("yardstick.network_services.vnf_generic.vnf.vfw_vnf.YangModel")
     @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Context")
     @mock.patch(SSH_HELPER)
@@ -348,18 +351,3 @@ pipeline>
                                                     'rules': ""}}
         self.scenario_cfg.update({"nodes": {"vnf__1": ""}})
         self.assertIsNone(vfw_approx_vnf.instantiate(self.scenario_cfg, self.context_cfg))
-
-    @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time")
-    @mock.patch(SSH_HELPER)
-    def test_terminate(self, ssh, *args):
-        mock_ssh(ssh)
-
-        vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
-        vfw_approx_vnf = FWApproxVnf(name, vnfd)
-        vfw_approx_vnf._vnf_process = mock.MagicMock()
-        vfw_approx_vnf.used_drivers = {"01:01.0": "i40e",
-                                       "01:01.1": "i40e"}
-        vfw_approx_vnf.vnf_execute = mock.Mock()
-        vfw_approx_vnf.dpdk_nic_bind = "dpdk_nic_bind.py"
-        vfw_approx_vnf._resource_collect_stop = mock.Mock()
-        self.assertIsNone(vfw_approx_vnf.terminate())