From 58087dc6ad2099e95e7a801e046710895a3876a1 Mon Sep 17 00:00:00 2001 From: Ross Brattain Date: Thu, 13 Jul 2017 11:20:42 -0700 Subject: tg: speedup unittests, mock time.sleep Change-Id: Ia6207c898653c3ba21b22e9c309e7abb25d5cd32 Signed-off-by: Ross Brattain --- tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py') diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py index 4ea180851..f306645fa 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py @@ -292,7 +292,8 @@ class TestTrexTrafficGenRFC(unittest.TestCase): file_path = os.path.join(curr_path, filename) return file_path - def test__traffic_runner(self): + @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_rfc2544_trex.time") + def test__traffic_runner(self, mock_time): mock_traffic_profile = mock.Mock(autospec=TrafficProfile) mock_traffic_profile.get_traffic_definition.return_value = "64" mock_traffic_profile.execute.return_value = "64" -- cgit 1.2.3-korg