def test_process_with_ssl2(self): exp = ExpectFinished((2, 0)) state = ConnectionState() state.msg_sock = mock.MagicMock() msg = ServerFinished().create(bytearray(range(12))) exp.process(state, msg)
def test_process(self): exp = ExpectFinished() # this probably should use mock objects to check if calcFinished # is called with them state = ConnectionState() msg = Message(ContentType.handshake, bytearray([HandshakeType.finished, 0, 0, 12]) + bytearray(b"\xa3;\x9c\xc9\'E\xbc\xf6\xc7\x96\xaf\x7f")) exp.process(state, msg)