diff options
author | Kubi <jean.gaoliang@huawei.com> | 2017-07-06 12:14:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-07-06 12:14:34 +0000 |
commit | 2bea82e39d62246552a9d6d49c74bbc32747f018 (patch) | |
tree | 4a83bfb2b001f7ef4ab51933c91e51df4a848755 /tests/unit/benchmark/scenarios/compute/test_ramspeed.py | |
parent | 917dea49415183eaff6d2f2fbf32ddeff64d9dfe (diff) | |
parent | 25a37b2048281c64719bd6ad67860f65f6c31546 (diff) |
Merge "move flatten dict key to common utils"
Diffstat (limited to 'tests/unit/benchmark/scenarios/compute/test_ramspeed.py')
-rw-r--r-- | tests/unit/benchmark/scenarios/compute/test_ramspeed.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/unit/benchmark/scenarios/compute/test_ramspeed.py b/tests/unit/benchmark/scenarios/compute/test_ramspeed.py index 85d49641e..4f71fbb36 100644 --- a/tests/unit/benchmark/scenarios/compute/test_ramspeed.py +++ b/tests/unit/benchmark/scenarios/compute/test_ramspeed.py @@ -18,6 +18,7 @@ import unittest import mock from oslo_serialization import jsonutils +from yardstick.common import utils from yardstick.benchmark.scenarios.compute import ramspeed @@ -77,7 +78,7 @@ class RamspeedTestCase(unittest.TestCase): "Block_size(kb)": 32768, "Bandwidth(MBps)": 8340.85}]}' mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '') r.run(self.result) - expected_result = jsonutils.loads(sample_output) + expected_result = utils.flatten_dict_key(jsonutils.loads(sample_output)) self.assertEqual(self.result, expected_result) def test_ramspeed_successful_run_sla(self, mock_ssh): @@ -113,7 +114,7 @@ class RamspeedTestCase(unittest.TestCase): "Block_size(kb)": 32768, "Bandwidth(MBps)": 8340.85}]}' mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '') r.run(self.result) - expected_result = jsonutils.loads(sample_output) + expected_result = utils.flatten_dict_key(jsonutils.loads(sample_output)) self.assertEqual(self.result, expected_result) def test_ramspeed_unsuccessful_run_sla(self, mock_ssh): @@ -179,7 +180,7 @@ class RamspeedTestCase(unittest.TestCase): "Bandwidth(MBps)": 9401.58}]}' mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '') r.run(self.result) - expected_result = jsonutils.loads(sample_output) + expected_result = utils.flatten_dict_key(jsonutils.loads(sample_output)) self.assertEqual(self.result, expected_result) def test_ramspeed_mem_successful_run_sla(self, mock_ssh): @@ -200,7 +201,7 @@ class RamspeedTestCase(unittest.TestCase): "Bandwidth(MBps)": 9401.58}]}' mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '') r.run(self.result) - expected_result = jsonutils.loads(sample_output) + expected_result = utils.flatten_dict_key(jsonutils.loads(sample_output)) self.assertEqual(self.result, expected_result) def test_ramspeed_mem_unsuccessful_run_sla(self, mock_ssh): |