aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/test_ssh.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test_ssh.py')
-rw-r--r--tests/unit/test_ssh.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/test_ssh.py b/tests/unit/test_ssh.py
index 4260b39bc..574da0343 100644
--- a/tests/unit/test_ssh.py
+++ b/tests/unit/test_ssh.py
@@ -156,6 +156,15 @@ class SSHTestCase(unittest.TestCase):
self.assertEqual([mock.call("uname")] * 3,
self.test_client.execute.mock_calls)
+ @mock.patch("yardstick.ssh.paramiko")
+ def test_send_command(self, mock_paramiko):
+ paramiko_sshclient = self.test_client._get_client()
+ with mock.patch.object(paramiko_sshclient, "exec_command") \
+ as mock_paramiko_exec_command:
+ self.test_client.send_command('cmd')
+ mock_paramiko_exec_command.assert_called_once_with('cmd',
+ get_pty=True)
+
class SSHRunTestCase(unittest.TestCase):
"""Test SSH.run method in different aspects.