aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark
diff options
context:
space:
mode:
authorVolodymyr Mytnyk <volodymyrx.mytnyk@intel.com>2018-11-12 13:01:08 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-11-12 13:01:08 +0000
commit74d047ead13b106cba007c089c111bfca51e8dac (patch)
treed4c1215f870bcf1a1f43531cadb040c024d83a49 /yardstick/tests/unit/benchmark
parent5e72ebaf14b3e414fe9a06bd9c6a0d2a859c7f79 (diff)
parentd99cfd9eaac88851d7efbb95292c2752755ae070 (diff)
Merge "Implement functionality for updating http client"
Diffstat (limited to 'yardstick/tests/unit/benchmark')
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py b/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
index 90248d1bf..8214782b2 100644
--- a/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
+++ b/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
@@ -325,6 +325,8 @@ class TestNetworkServiceTestCase(unittest.TestCase):
},
},
'options': {
+ 'simulated_users': {'uplink': [1, 2]},
+ 'page_object': {'uplink': [1, 2]},
'framesize': {'64B': 100}
},
'runner': {
@@ -620,6 +622,20 @@ class TestNetworkServiceTestCase(unittest.TestCase):
with self.assertRaises(IOError):
self.s._get_traffic_profile()
+ def test__key_list_to_dict(self):
+ result = self.s._key_list_to_dict("uplink", {"uplink": [1, 2]})
+ self.assertEqual({"uplink_0": 1, "uplink_1": 2}, result)
+
+ def test__get_simulated_users(self):
+ result = self.s._get_simulated_users()
+ self.assertEqual({'simulated_users': {'uplink_0': 1, 'uplink_1': 2}},
+ result)
+
+ def test__get_page_object(self):
+ result = self.s._get_page_object()
+ self.assertEqual({'page_object': {'uplink_0': 1, 'uplink_1': 2}},
+ result)
+
def test___get_traffic_imix_exception(self):
with mock.patch.dict(self.scenario_cfg["traffic_options"], {'imix': ''}):
self.assertEqual({'imix': {'64B': 100}},
@@ -642,7 +658,11 @@ class TestNetworkServiceTestCase(unittest.TestCase):
'flow': {'flow': {}},
'imix': {'imix': {'64B': 100}},
'uplink': {},
- 'duration': 30}
+ 'duration': 30,
+ 'simulated_users': {
+ 'simulated_users': {'uplink_0': 1, 'uplink_1': 2}},
+ 'page_object': {
+ 'page_object': {'uplink_0': 1, 'uplink_1': 2}},}
)
mock_tprofile_get.assert_called_once_with(fake_vnfd)