Code Review
/
yardstick.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Proposing Abhijit Sinha as a committer in Yardstick"
[yardstick.git]
/
tests
/
unit
/
network_services
/
traffic_profile
/
test_prox_binsearch.py
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
f56a7fb
..
c1f1c82
100644
(file)
--- 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()
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 = 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)
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()
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 = 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)
profile.execute_traffic(traffic_generator)
self.assertEqual(round(profile.current_lower, 2), 24.06)