mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-17 16:09:14 +00:00
test(websocket): separate ping and init
This commit is contained in:
parent
a2a4b461e7
commit
f14866bdbc
|
@ -29,7 +29,7 @@ def test_websocket_connection_bare(authorized_client):
|
|||
assert websocket.scope is not None
|
||||
|
||||
|
||||
def test_websocket_graphql_ping(authorized_client):
|
||||
def test_websocket_graphql_init(authorized_client):
|
||||
client = authorized_client
|
||||
with client.websocket_connect(
|
||||
"/graphql", subprotocols=["graphql-transport-ws"]
|
||||
|
@ -38,6 +38,12 @@ def test_websocket_graphql_ping(authorized_client):
|
|||
ack = websocket.receive_json()
|
||||
assert ack == {"type": "connection_ack"}
|
||||
|
||||
|
||||
def test_websocket_graphql_ping(authorized_client):
|
||||
client = authorized_client
|
||||
with client.websocket_connect(
|
||||
"/graphql", subprotocols=["graphql-transport-ws"]
|
||||
) as websocket:
|
||||
# https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md#ping
|
||||
websocket.send_json({"type": "ping", "payload": {}})
|
||||
pong = websocket.receive_json()
|
||||
|
|
Loading…
Reference in a new issue