Skip to content

Commit c007f58

Browse files
committed
Correctly test a bad graphql parameter
1 parent f641e58 commit c007f58

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_graphql_ws.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def test_start_bad_graphql_params(self, ss, cc):
111111
ss.unsubscribe = mock.Mock()
112112
ss.on_start = mock.Mock()
113113
ss.process_message(
114-
cc, {"id": "1", "type": constants.GQL_START, "payload": {"a": "b"}}
114+
cc, {"id": "1", "type": None, "payload": {"a": "b"}}
115115
)
116116
assert ss.send_error.called
117117
assert ss.send_error.call_args[0][:2] == (cc, "1")
@@ -136,15 +136,15 @@ def test_get_graphql_params(ss, cc):
136136
"query": "req",
137137
"variables": "vars",
138138
"operationName": "query",
139-
"context": "ctx",
139+
"context": {},
140140
}
141141
params = ss.get_graphql_params(cc, payload)
142142
assert isinstance(params.pop("executor"), SyncExecutor)
143143
assert params == {
144144
"request_string": "req",
145145
"variable_values": "vars",
146146
"operation_name": "query",
147-
"context_value": "ctx",
147+
"context_value": {'request_context': None},
148148
}
149149

150150

0 commit comments

Comments
 (0)