|
|
@ -93,11 +93,13 @@ class TestConnectionClass(unittest.TestCase):
|
|
|
|
terminal = MagicMock(supports_multiplexing=False)
|
|
|
|
terminal = MagicMock(supports_multiplexing=False)
|
|
|
|
conn._terminal = terminal
|
|
|
|
conn._terminal = terminal
|
|
|
|
conn._ssh_shell = MagicMock()
|
|
|
|
conn._ssh_shell = MagicMock()
|
|
|
|
|
|
|
|
conn.paramiko_conn = MagicMock()
|
|
|
|
conn._connected = True
|
|
|
|
conn._connected = True
|
|
|
|
|
|
|
|
|
|
|
|
conn.close()
|
|
|
|
conn.close()
|
|
|
|
self.assertTrue(terminal.on_close_shell.called)
|
|
|
|
self.assertTrue(terminal.on_close_shell.called)
|
|
|
|
self.assertIsNone(conn._ssh_shell)
|
|
|
|
self.assertIsNone(conn._ssh_shell)
|
|
|
|
|
|
|
|
self.assertIsNone(conn.paramiko_conn)
|
|
|
|
|
|
|
|
|
|
|
|
@patch("ansible.plugins.connection.paramiko_ssh.Connection._connect")
|
|
|
|
@patch("ansible.plugins.connection.paramiko_ssh.Connection._connect")
|
|
|
|
def test_network_cli_exec_command(self, mocked_super):
|
|
|
|
def test_network_cli_exec_command(self, mocked_super):
|
|
|
|