mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
roll up of eos fixes (#21629)
* fixes error where eos would close the cli shell * fixes network_cli connection plugin to check before calling open_shell() * fixes json commands being sent over eapi
This commit is contained in:
parent
76c9ad9dfc
commit
d5f7a0181b
4 changed files with 23 additions and 19 deletions
|
@ -45,7 +45,6 @@ class TestConnectionClass(unittest.TestCase):
|
|||
conn.ssh = None
|
||||
|
||||
self.assertRaises(AnsibleConnectionFailure, conn._connect)
|
||||
#mocked_terminal_loader.all.assert_called_with(class_only=True)
|
||||
|
||||
mocked_terminal_loader.reset_mock()
|
||||
mocked_terminal_loader.get.return_value = None
|
||||
|
@ -139,6 +138,7 @@ class TestConnectionClass(unittest.TestCase):
|
|||
conn._shell = MagicMock()
|
||||
|
||||
# test _shell already open
|
||||
conn._connected = MagicMock(return_value=True)
|
||||
rc, out, err = conn.exec_command('command')
|
||||
self.assertEqual(out, 'command response')
|
||||
self.assertFalse(mock_open_shell.called)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue