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

Method test_wrong_data_after_banner

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

Source from the content-addressed store, hash-verified

135 assert 'empty' in lines[-1]
136
137 def test_wrong_data_after_banner(self, output_spy, virtual_socket):
138 vsocket = virtual_socket
139 vsocket.rdata.append(b'SSH-2.0-ssh-audit-test\r\n')
140 vsocket.rdata.append(b'xxx\n')
141 lines = self._audit(output_spy)
142 assert len(lines) == 2
143 assert 'error reading packet' in lines[-1]
144 assert 'xxx' in lines[-1]
145
146 def test_non_ascii_banner(self, output_spy, virtual_socket):
147 vsocket = virtual_socket

Callers

nothing calls this directly

Calls 1

_auditMethod · 0.95

Tested by

no test coverage detected