aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/benchmark/scenarios/compute/test_computecapacity.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/benchmark/scenarios/compute/test_computecapacity.py')
-rw-r--r--tests/unit/benchmark/scenarios/compute/test_computecapacity.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/benchmark/scenarios/compute/test_computecapacity.py b/tests/unit/benchmark/scenarios/compute/test_computecapacity.py
index 4efa66932..7b9a5ad4a 100644
--- a/tests/unit/benchmark/scenarios/compute/test_computecapacity.py
+++ b/tests/unit/benchmark/scenarios/compute/test_computecapacity.py
@@ -45,7 +45,7 @@ class ComputeCapacityTestCase(unittest.TestCase):
def test_capacity_successful_setup(self, mock_ssh):
c = computecapacity.ComputeCapacity({}, self.ctx)
- mock_ssh.SSH().execute.return_value = (0, '', '')
+ mock_ssh.SSH.from_node().execute.return_value = (0, '', '')
c.setup()
self.assertIsNotNone(c.client)
@@ -54,7 +54,7 @@ class ComputeCapacityTestCase(unittest.TestCase):
def test_capacity_successful(self, mock_ssh):
c = computecapacity.ComputeCapacity({}, self.ctx)
- mock_ssh.SSH().execute.return_value = (0, SAMPLE_OUTPUT, '')
+ mock_ssh.SSH.from_node().execute.return_value = (0, SAMPLE_OUTPUT, '')
c.run(self.result)
expected_result = jsonutils.loads(SAMPLE_OUTPUT)
self.assertEqual(self.result, expected_result)
@@ -62,5 +62,5 @@ class ComputeCapacityTestCase(unittest.TestCase):
def test_capacity_unsuccessful_script_error(self, mock_ssh):
c = computecapacity.ComputeCapacity({}, self.ctx)
- mock_ssh.SSH().execute.return_value = (1, '', 'FOOBAR')
+ mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
self.assertRaises(RuntimeError, c.run, self.result)