summaryrefslogtreecommitdiffstats
path: root/tests/unit/test_ssh.py
diff options
context:
space:
mode:
authorliang gao <jean.gaoliang@huawei.com>2016-08-15 01:36:16 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-15 01:36:16 +0000
commit5d0fb5e5ed3fc324cac995994b061b6d449fc869 (patch)
treeab4e25b6eadb99a23f4682d7a869e01c0f8e193e /tests/unit/test_ssh.py
parent3f9d76ec447d917446fd4dd3dd8c0a2a3f758f33 (diff)
parent8953fa3d53019571a222a1aedb7cf796c5d67aec (diff)
Merge "[Yardstick-233]latency measurment by using pktgen-dpdk"
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.