X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2Funit%2Fnetwork_services%2Ftraffic_profile%2Ftest_prox_binsearch.py;h=c1f1c825b3646771f61b21efbe3a83d376506f7d;hb=4946bfbee16b9738a996d7ec6750caa9c064d156;hp=f56a7fba9b26035485fd9b558d77ccf652e6f018;hpb=2761306b3d9fa31b192a44129de5bb5d39279d73;p=yardstick.git diff --git a/tests/unit/network_services/traffic_profile/test_prox_binsearch.py b/tests/unit/network_services/traffic_profile/test_prox_binsearch.py index f56a7fba9..c1f1c825b 100644 --- a/tests/unit/network_services/traffic_profile/test_prox_binsearch.py +++ b/tests/unit/network_services/traffic_profile/test_prox_binsearch.py @@ -51,10 +51,13 @@ class TestProxBinSearchProfile(unittest.TestCase): fail_tuple = ProxTestDataTuple(10.0, 1, 2, 3, 4, [5.6, 5.7, 5.8], 850, 1000, 123.4) traffic_generator = mock.MagicMock() - traffic_generator.run_test = target + + profile_helper = mock.MagicMock() + profile_helper.run_test = target profile = ProxBinSearchProfile(tp_config) profile.init(mock.MagicMock()) + profile._profile_helper = profile_helper profile.execute_traffic(traffic_generator) self.assertEqual(round(profile.current_lower, 2), 74.69) @@ -82,10 +85,13 @@ class TestProxBinSearchProfile(unittest.TestCase): fail_tuple = ProxTestDataTuple(10.0, 1, 2, 3, 4, [5.6, 5.7, 5.8], 850, 1000, 123.4) traffic_generator = mock.MagicMock() - traffic_generator.run_test = target + + profile_helper = mock.MagicMock() + profile_helper.run_test = target profile = ProxBinSearchProfile(tp_config) profile.init(mock.MagicMock()) + profile._profile_helper = profile_helper profile.execute_traffic(traffic_generator) self.assertEqual(round(profile.current_lower, 2), 24.06)