mirror of https://gitlab.com/litecord/litecord.git
test_websocket: use _close on test_ready
This commit is contained in:
parent
07c66d121a
commit
0e57ad9633
|
|
@ -72,7 +72,7 @@ async def test_gw(test_cli):
|
||||||
assert isinstance(hello['d']['heartbeat_interval'], int)
|
assert isinstance(hello['d']['heartbeat_interval'], int)
|
||||||
assert isinstance(hello['d']['_trace'], list)
|
assert isinstance(hello['d']['_trace'], list)
|
||||||
|
|
||||||
await conn.close(1000, 'test end')
|
await _close(conn)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
|
|
@ -94,9 +94,10 @@ async def test_ready(test_cli):
|
||||||
try:
|
try:
|
||||||
await _json(conn)
|
await _json(conn)
|
||||||
assert True
|
assert True
|
||||||
await conn.close(1000, 'test end')
|
|
||||||
except (Exception, websockets.ConnectionClosed):
|
except (Exception, websockets.ConnectionClosed):
|
||||||
assert False
|
assert False
|
||||||
|
finally:
|
||||||
|
await _close(conn)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue