def test_deserialize(self): go_away = GoAwayFrame(stream_id=0) go_away.deserialize(self.payload) self.assertEqual(go_away.last_stream_id, 64) self.assertEqual(go_away.error_code, ErrorCode.ENHANCE_YOUR_CALM) self.assertEqual(go_away.debug_data, b'logs n stuff')
def test_serialize(self): go_away = GoAwayFrame(stream_id=0) go_away.deserialize(self.payload) frame_bytes = go_away.serialize() self.assertEqual(b'\x00\x14\x07\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x04\x00logs n stuff', frame_bytes)