diff options
Diffstat (limited to 'yardstick/tests/unit/network_services')
-rw-r--r-- | yardstick/tests/unit/network_services/traffic_profile/test_prox_profile.py | 4 | ||||
-rw-r--r-- | yardstick/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/yardstick/tests/unit/network_services/traffic_profile/test_prox_profile.py b/yardstick/tests/unit/network_services/traffic_profile/test_prox_profile.py index cf31cc27c..11bee03a4 100644 --- a/yardstick/tests/unit/network_services/traffic_profile/test_prox_profile.py +++ b/yardstick/tests/unit/network_services/traffic_profile/test_prox_profile.py @@ -100,13 +100,13 @@ class TestProxProfile(unittest.TestCase): profile = ProxProfile(tp_config) - self.assertFalse(profile.done) + self.assertFalse(profile.done.is_set()) for _ in packet_sizes: with self.assertRaises(NotImplementedError): profile.execute_traffic(traffic_generator) self.assertIsNone(profile.execute_traffic(traffic_generator)) - self.assertTrue(profile.done) + self.assertTrue(profile.done.is_set()) def test_bounds_iterator(self): tp_config = { diff --git a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py index 3b095647c..3d6ebb25b 100644 --- a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py +++ b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py @@ -1527,14 +1527,16 @@ class TestProxResourceHelper(unittest.TestCase): def test_run_traffic(self): setup_helper = mock.MagicMock() helper = prox_helpers.ProxResourceHelper(setup_helper) - traffic_profile = mock.MagicMock(**{"done": True}) + traffic_profile = mock.MagicMock() + traffic_profile.done.is_set.return_value = True helper.run_traffic(traffic_profile) self.assertEqual(helper._terminated.value, 1) def test__run_traffic_once(self): setup_helper = mock.MagicMock() helper = prox_helpers.ProxResourceHelper(setup_helper) - traffic_profile = mock.MagicMock(**{"done": True}) + traffic_profile = mock.MagicMock() + traffic_profile.done.is_set.return_value = True helper._run_traffic_once(traffic_profile) self.assertEqual(helper._terminated.value, 1) |