Merge "bugfix: tc054 default value is wrong"
[yardstick.git] / tests / unit / cmd / test_NSBperf.py
index a14c084..e1b4da7 100644 (file)
@@ -29,7 +29,7 @@ from yardstick.cmd import NSBperf
 class TestHandler(unittest.TestCase):
     def test_handler(self, test):
         subprocess.call = mock.Mock(return_value=0)
-        self.assertRaises(SystemExit, NSBperf.handler)
+        self.assertRaises(SystemExit, NSBperf.sigint_handler)
 
 
 class TestYardstickNSCli(unittest.TestCase):
@@ -40,7 +40,8 @@ class TestYardstickNSCli(unittest.TestCase):
     def test_generate_final_report(self):
         yardstick_ns_cli = YardstickNSCli()
         test_case = "tc_baremetal_rfc2544_ipv4_1flow_1518B.yaml"
-        subprocess.call(["touch", "/tmp/yardstick.out"])
+        if os.path.isfile("/tmp/yardstick.out"):
+            os.remove('/tmp/yardstick.out')
         self.assertIsNone(yardstick_ns_cli.generate_final_report(test_case))
 
     def test_generate_kpi_results(self):