mirror of https://gitlab.com/litecord/litecord.git
tests: assert we are in a good state on autoreply
This commit is contained in:
parent
38b560205f
commit
049523b03f
|
|
@ -28,6 +28,7 @@ import pytest
|
|||
import websockets
|
||||
from logbook import Logger
|
||||
from wsproto import WSConnection, ConnectionType
|
||||
from wsproto.connection import ConnectionState
|
||||
from wsproto.events import (
|
||||
Request,
|
||||
Message,
|
||||
|
|
@ -132,6 +133,7 @@ class AsyncWebsocket:
|
|||
break
|
||||
|
||||
if isinstance(event, CloseConnection):
|
||||
assert self.ws.state is ConnectionState.REMOTE_CLOSING
|
||||
await self.send(event.response())
|
||||
if process_event:
|
||||
raise websockets.ConnectionClosed(
|
||||
|
|
|
|||
Loading…
Reference in New Issue