diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-06-28 17:00:25 +0100 |
---|---|---|
committer | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-06-28 17:00:52 +0100 |
commit | 3327680ec27c9bbbb5b7d927c05c8c984ece4f18 (patch) | |
tree | 702676cc22f8097c60825e051c15e819c5fb2c31 | |
parent | 2d10b0bf7238f5417d46f89c76b856f7e345f738 (diff) |
Cleanup ScenarioGeneral unit tests
Removed unneeded output.
JIRA: YARDSTICK-1263
Change-Id: I2ca738a7234cfffb3fd3d3e9566ad043b2d132dc
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
-rw-r--r-- | yardstick/tests/unit/benchmark/scenarios/availability/test_scenario_general.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/yardstick/tests/unit/benchmark/scenarios/availability/test_scenario_general.py b/yardstick/tests/unit/benchmark/scenarios/availability/test_scenario_general.py index cd065c961..dbf3d83b2 100644 --- a/yardstick/tests/unit/benchmark/scenarios/availability/test_scenario_general.py +++ b/yardstick/tests/unit/benchmark/scenarios/availability/test_scenario_general.py @@ -13,6 +13,7 @@ import unittest from yardstick.benchmark.scenarios.availability import scenario_general from yardstick.common import exceptions as y_exc + class ScenarioGeneralTestCase(unittest.TestCase): @mock.patch.object(scenario_general, 'Director') @@ -37,19 +38,21 @@ class ScenarioGeneralTestCase(unittest.TestCase): 'index': 2}] } } - self.instance = scenario_general.ScenarioGeneral(self.scenario_cfg, None) + self.instance = scenario_general.ScenarioGeneral(self.scenario_cfg, + None) self.instance.setup() self.instance.director.verify.return_value = True def test_scenario_general_all_successful(self): - ret = {} self.instance.run(ret) self.instance.teardown() self.assertEqual(ret['sla_pass'], 1) - def test_scenario_general_exception(self): - self.instance.director.createActionPlayer.side_effect = KeyError('Wrong') + @mock.patch.object(scenario_general.LOG, 'exception') + def test_scenario_general_exception(self, *args): + self.instance.director.createActionPlayer.side_effect = ( + KeyError('Wrong')) self.instance.director.data = {} ret = {} self.instance.run(ret) |