예제 #1
0
파일: test_ssh.py 프로젝트: jriguera/ironic
 def test__ssh_execute(self, exec_ssh_mock):
     ssh_cmd = "somecmd"
     expected = ['a', 'b', 'c']
     exec_ssh_mock.return_value = ('\n'.join(expected), '')
     lst = ssh._ssh_execute(self.sshclient, ssh_cmd)
     exec_ssh_mock.assert_called_once_with(self.sshclient, ssh_cmd)
     self.assertEqual(expected, lst)
예제 #2
0
 def test__ssh_execute(self):
     ssh_cmd = "somecmd"
     expected = ['a', 'b', 'c']
     self.exec_ssh_mock.return_value = ('\n'.join(expected), '')
     lst = ssh._ssh_execute(self.sshclient, ssh_cmd)
     self.exec_ssh_mock.assert_called_once_with(self.sshclient, ssh_cmd)
     self.assertEqual(expected, lst)
예제 #3
0
 def test__ssh_execute(self, exec_ssh_mock):
     ssh_cmd = "somecmd"
     expected = ["a", "b", "c"]
     exec_ssh_mock.return_value = ("\n".join(expected), "")
     lst = ssh._ssh_execute(self.sshclient, ssh_cmd)
     exec_ssh_mock.assert_called_once_with(self.sshclient, ssh_cmd)
     self.assertEqual(expected, lst)