aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/benchmark/scenarios/availability/test_result_checker_general.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/benchmark/scenarios/availability/test_result_checker_general.py')
-rw-r--r--tests/unit/benchmark/scenarios/availability/test_result_checker_general.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/unit/benchmark/scenarios/availability/test_result_checker_general.py b/tests/unit/benchmark/scenarios/availability/test_result_checker_general.py
index c5451fabd..d036bb0da 100644
--- a/tests/unit/benchmark/scenarios/availability/test_result_checker_general.py
+++ b/tests/unit/benchmark/scenarios/availability/test_result_checker_general.py
@@ -47,7 +47,7 @@ class GeneralResultCheckerTestCase(unittest.TestCase):
def test__result_checker_eq(self, mock_open, mock_ssh):
ins = result_checker_general.GeneralResultChecker(self.checker_cfg,
self.context)
- mock_ssh.SSH().execute.return_value = (0, "1", '')
+ mock_ssh.SSH.from_node().execute.return_value = (0, "1", '')
ins.setup()
self.assertTrue(ins.verify())
@@ -56,7 +56,7 @@ class GeneralResultCheckerTestCase(unittest.TestCase):
config['condition'] = 'gt'
ins = result_checker_general.GeneralResultChecker(config,
self.context)
- mock_ssh.SSH().execute.return_value = (0, "2", '')
+ mock_ssh.SSH.from_node().execute.return_value = (0, "2", '')
ins.setup()
self.assertTrue(ins.verify())
@@ -65,7 +65,7 @@ class GeneralResultCheckerTestCase(unittest.TestCase):
config['condition'] = 'gt_eq'
ins = result_checker_general.GeneralResultChecker(config,
self.context)
- mock_ssh.SSH().execute.return_value = (0, "1", '')
+ mock_ssh.SSH.from_node().execute.return_value = (0, "1", '')
ins.setup()
self.assertTrue(ins.verify())
@@ -74,7 +74,7 @@ class GeneralResultCheckerTestCase(unittest.TestCase):
config['condition'] = 'lt'
ins = result_checker_general.GeneralResultChecker(config,
self.context)
- mock_ssh.SSH().execute.return_value = (0, "0", '')
+ mock_ssh.SSH.from_node().execute.return_value = (0, "0", '')
ins.setup()
self.assertTrue(ins.verify())
@@ -83,7 +83,7 @@ class GeneralResultCheckerTestCase(unittest.TestCase):
config['condition'] = 'lt_eq'
ins = result_checker_general.GeneralResultChecker(config,
self.context)
- mock_ssh.SSH().execute.return_value = (0, "1", '')
+ mock_ssh.SSH.from_node().execute.return_value = (0, "1", '')
ins.setup()
self.assertTrue(ins.verify())
@@ -93,7 +93,7 @@ class GeneralResultCheckerTestCase(unittest.TestCase):
config['expectedValue'] = "value"
ins = result_checker_general.GeneralResultChecker(config,
self.context)
- mock_ssh.SSH().execute.return_value = (0, "value return", '')
+ mock_ssh.SSH.from_node().execute.return_value = (0, "value return", '')
ins.setup()
self.assertTrue(ins.verify())
@@ -102,7 +102,7 @@ class GeneralResultCheckerTestCase(unittest.TestCase):
config['condition'] = 'wrong'
ins = result_checker_general.GeneralResultChecker(config,
self.context)
- mock_ssh.SSH().execute.return_value = (0, "1", '')
+ mock_ssh.SSH.from_node().execute.return_value = (0, "1", '')
ins.setup()
self.assertFalse(ins.verify())
@@ -111,6 +111,6 @@ class GeneralResultCheckerTestCase(unittest.TestCase):
config.pop('parameter')
ins = result_checker_general.GeneralResultChecker(config,
self.context)
- mock_ssh.SSH().execute.return_value = (1, "fail", '')
+ mock_ssh.SSH.from_node().execute.return_value = (1, "fail", '')
ins.setup()
ins.verify()