mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 21:31:26 -07:00
enhance recv calls in network_cli (#47345)
* enhance recv calls in network_cli * updated network_cli test unit * enhance recv calls in network_cli * fix mistake * better timeout management * remove exception trigger * test * test2 * restore exception and timeout * ganeshrn's way * correction * timeout and exception return
This commit is contained in:
parent
9fe20123cf
commit
c649d0ea32
2 changed files with 16 additions and 2 deletions
|
@ -126,6 +126,8 @@ class TestConnectionClass(unittest.TestCase):
|
|||
|
||||
mock__shell = MagicMock()
|
||||
conn._ssh_shell = mock__shell
|
||||
conn._ssh_shell.recv_ready.return_value = True
|
||||
conn._ssh_shell.gettimeout.return_value = 10
|
||||
|
||||
response = b"""device#command
|
||||
command response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue