Skip to content

Commit 5901571

Browse files
committed
update tests
1 parent 15e95df commit 5901571

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test_asgi_server.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ def test_websocket(self):
178178
b'Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\n'
179179
b'Connection: upgrade\r\n\r\n%s' % (
180180
ASGI_PORT,
181-
WebSocket.create_frame(b'Hello, world!', mask=True))
181+
WebSocket.create_frame(b'Hello, world!', mask=True) +
182+
WebSocket.create_frame(b'\x03\xe8', opcode=8))
182183
)
183184
self.assertEqual(body[:15], WebSocket.create_frame(b'Hello, world!'))
184185

@@ -219,7 +220,8 @@ def test_websocket_invalid_opcode(self):
219220
b'Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\n'
220221
b'Connection: upgrade\r\n\r\n%s' % (
221222
ASGI_PORT,
222-
WebSocket.create_frame(b'', mask=True, opcode=0xc))
223+
WebSocket.create_frame(b'', mask=True, opcode=0xc) +
224+
WebSocket.create_frame(b'\x03\xe8', opcode=8))
223225
)
224226
self.assertEqual(body, b'\x88\x02\x03\xf0')
225227

0 commit comments

Comments
 (0)