update tests

This commit is contained in:
Alexander Prinzhorn 2021-07-13 16:22:10 +02:00
parent 793f5c5681
commit 13f115451b

View File

@ -249,6 +249,9 @@ def test_close_disconnect(ws_testdata):
>> reply() >> reply()
>> ConnectionClosed(tctx.client) >> ConnectionClosed(tctx.client)
) )
# The \x03\xe8 above is code 1000 (normal closure).
# But 1006 (ABNORMAL_CLOSURE) is expected, because the connection was already closed.
assert flow.websocket.close_code == 1006
def test_close_error(ws_testdata): def test_close_error(ws_testdata):
@ -265,6 +268,7 @@ def test_close_error(ws_testdata):
<< websocket.WebsocketEndHook(flow) << websocket.WebsocketEndHook(flow)
>> reply() >> reply()
) )
assert flow.websocket.close_code == 4000
def test_deflate(ws_testdata): def test_deflate(ws_testdata):