summaryrefslogtreecommitdiffstats
path: root/tests/unit/benchmark/scenarios/networking/test_ping.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/benchmark/scenarios/networking/test_ping.py')
-rw-r--r--tests/unit/benchmark/scenarios/networking/test_ping.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit/benchmark/scenarios/networking/test_ping.py b/tests/unit/benchmark/scenarios/networking/test_ping.py
index 5535a79a9..5269309c2 100644
--- a/tests/unit/benchmark/scenarios/networking/test_ping.py
+++ b/tests/unit/benchmark/scenarios/networking/test_ping.py
@@ -43,7 +43,7 @@ class PingTestCase(unittest.TestCase):
p = ping.Ping(args, self.ctx)
- mock_ssh.SSH().execute.return_value = (0, '100', '')
+ mock_ssh.SSH.from_node().execute.return_value = (0, '100', '')
p.run(result)
self.assertEqual(result, {'rtt': {'ares': 100.0}})
@@ -59,7 +59,7 @@ class PingTestCase(unittest.TestCase):
p = ping.Ping(args, self.ctx)
- mock_ssh.SSH().execute.return_value = (0, '100', '')
+ mock_ssh.SSH.from_node().execute.return_value = (0, '100', '')
p.run(result)
self.assertEqual(result, {'rtt': {'ares': 100.0}})
@@ -75,7 +75,7 @@ class PingTestCase(unittest.TestCase):
p = ping.Ping(args, self.ctx)
- mock_ssh.SSH().execute.return_value = (0, '100', '')
+ mock_ssh.SSH.from_node().execute.return_value = (0, '100', '')
self.assertRaises(AssertionError, p.run, result)
@mock.patch('yardstick.benchmark.scenarios.networking.ping.ssh')
@@ -90,7 +90,7 @@ class PingTestCase(unittest.TestCase):
p = ping.Ping(args, self.ctx)
- mock_ssh.SSH().execute.return_value = (1, '', 'FOOBAR')
+ mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
self.assertRaises(RuntimeError, p.run, result)