mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-19 19:30:22 -07:00
Base connection class for network-style connections (#41839)
* Create base class for network-style connections * clean up some differences * Move NetworkConnectionBase * Tweak netconf for tests * Tweak when network_os is checked to avoid failing tests * Pull back exec_command
This commit is contained in:
parent
380d08af5d
commit
5850591d14
6 changed files with 198 additions and 253 deletions
|
@ -64,10 +64,10 @@ class TestConnectionClass(unittest.TestCase):
|
|||
@patch("ansible.plugins.connection.paramiko_ssh.Connection._connect")
|
||||
def test_network_cli__connect(self, mocked_super, mocked_terminal_loader):
|
||||
pc = PlayContext()
|
||||
pc.network_os = 'ios'
|
||||
new_stdin = StringIO()
|
||||
|
||||
conn = connection_loader.get('network_cli', pc, '/dev/null')
|
||||
pc.network_os = 'ios'
|
||||
|
||||
conn.ssh = MagicMock()
|
||||
conn.receive = MagicMock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue