aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/benchmark/scenarios/compute/test_cachestat.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/benchmark/scenarios/compute/test_cachestat.py')
-rw-r--r--tests/unit/benchmark/scenarios/compute/test_cachestat.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/tests/unit/benchmark/scenarios/compute/test_cachestat.py b/tests/unit/benchmark/scenarios/compute/test_cachestat.py
index f5a6b5ff9..8a06c754b 100644
--- a/tests/unit/benchmark/scenarios/compute/test_cachestat.py
+++ b/tests/unit/benchmark/scenarios/compute/test_cachestat.py
@@ -11,6 +11,7 @@
# Unittest for yardstick.benchmark.scenarios.compute.cachestat.CACHEstat
+from __future__ import absolute_import
import mock
import unittest
import os
@@ -72,11 +73,19 @@ class CACHEstatTestCase(unittest.TestCase):
output = self._read_file("cachestat_sample_output.txt")
mock_ssh.SSH().execute.return_value = (0, output, '')
result = c._get_cache_usage()
- expected_result = {"cachestat": {"cache0": {"HITS": "6462",\
- "DIRTIES": "29", "RATIO": "100.0%", "MISSES": "0", "BUFFERS_MB": "1157",\
- "CACHE_MB": "66782"}}, "average": {"HITS": 6462, "DIRTIES": 29, "RATIO": "100.0%",\
- "MISSES": 0, "BUFFERS_MB":1157, "CACHE_MB": 66782}, "max": {"HITS": 6462,\
- "DIRTIES": 29, "RATIO": 100.0, "MISSES": 0, "BUFFERS_MB": 1157, "CACHE_MB": 66782}}
+ expected_result = {"cachestat": {"cache0": {"HITS": "6462",
+ "DIRTIES": "29",
+ "RATIO": "100.0%",
+ "MISSES": "0",
+ "BUFFERS_MB": "1157",
+ "CACHE_MB": "66782"}},
+ "average": {"HITS": 6462, "DIRTIES": 29,
+ "RATIO": "100.0%",
+ "MISSES": 0, "BUFFERS_MB": 1157,
+ "CACHE_MB": 66782},
+ "max": {"HITS": 6462,
+ "DIRTIES": 29, "RATIO": 100.0, "MISSES": 0,
+ "BUFFERS_MB": 1157, "CACHE_MB": 66782}}
self.assertEqual(result, expected_result)