MCPcopy
hub / github.com/jtesta/ssh-audit / test_connection_timeout

Method test_connection_timeout

test/test_errors.py:59–64  ·  view source on GitHub ↗
(self, output_spy, virtual_socket)

Source from the content-addressed store, hash-verified

57 assert 'Connection refused' in lines[-1]
58
59 def test_connection_timeout(self, output_spy, virtual_socket):
60 vsocket = virtual_socket
61 vsocket.errors['connect'] = socket.timeout('timed out')
62 lines = self._audit(output_spy, exit_expected=True)
63 assert len(lines) == 1
64 assert 'timed out' in lines[-1]
65
66 def test_recv_empty(self, output_spy, virtual_socket):
67 lines = self._audit(output_spy)

Callers

nothing calls this directly

Calls 1

_auditMethod · 0.95

Tested by

no test coverage detected