Skip to content

Commit bb2c988

Browse files
committed
Add todos for tests
1 parent 1e0d534 commit bb2c988

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

st2actions/tests/unit/test_paramiko_ssh.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -803,10 +803,8 @@ def test_use_ssh_config_port_value_provided_in_the_config(self, mock_sshclient):
803803
call_kwargs = mock_client.connect.call_args[1]
804804
self.assertEqual(call_kwargs['port'], 9999)
805805

806-
@patch('paramiko.SSHClient', Mock)
807806
@patch.object(ParamikoSSHClient, '_is_key_file_needs_passphrase',
808807
MagicMock(return_value=False))
809-
810808
def test_socket_closed(self):
811809
conn_params = {'hostname': 'dummy.host.org',
812810
'username': 'ubuntu',
@@ -823,14 +821,14 @@ def test_socket_closed(self):
823821
ssh_client.socket = Mock()
824822

825823
# Make sure we havent called any close methods at this point
824+
# TODO: Replace these with .assert_not_called() once it's Python 3.6+ only
826825
self.assertEqual(ssh_client.socket.process.kill.call_count, 0)
827826
self.assertEqual(ssh_client.socket.process.poll.call_count, 0)
828827

829828
# Call the function that has changed
830829
ssh_client.close()
831830

832831
# Make sure we have called kill and poll
832+
# TODO: Replace these with .assert_called_once() once it's Python 3.6+ only
833833
self.assertEqual(ssh_client.socket.process.kill.call_count, 1)
834834
self.assertEqual(ssh_client.socket.process.poll.call_count, 1)
835-
836-

0 commit comments

Comments
 (0)