@@ -46,7 +46,6 @@ def execute(self):
46
46
47
47
48
48
@pytest .mark .aiohttp
49
- @pytest .mark .asyncio
50
49
def test_request_async_execute_batch_not_implemented_yet ():
51
50
from gql .transport .aiohttp import AIOHTTPTransport
52
51
@@ -145,32 +144,13 @@ def test_execute_result_error():
145
144
client .execute (failing_query )
146
145
assert 'Cannot query field "id" on type "Continent".' in str (exc_info .value )
147
146
147
+ """
148
+ Batching is not supported anymore on countries backend
149
+
148
150
with pytest.raises(TransportQueryError) as exc_info:
149
151
client.execute_batch([GraphQLRequest(document=failing_query)])
150
152
assert 'Cannot query field "id" on type "Continent".' in str(exc_info.value)
151
-
152
-
153
- @pytest .mark .online
154
- @pytest .mark .requests
155
- def test_http_transport_raise_for_status_error (http_transport_query ):
156
- from gql .transport .requests import RequestsHTTPTransport
157
-
158
- with Client (
159
- transport = RequestsHTTPTransport (
160
- url = "https://countries.trevorblades.com/" ,
161
- use_json = False ,
162
- headers = {"Content-type" : "application/json" },
163
- )
164
- ) as client :
165
- with pytest .raises (Exception ) as exc_info :
166
- client .execute (http_transport_query )
167
-
168
- assert "400 Client Error: Bad Request for url" in str (exc_info .value )
169
-
170
- with pytest .raises (Exception ) as exc_info :
171
- client .execute_batch ([GraphQLRequest (document = http_transport_query )])
172
-
173
- assert "400 Client Error: Bad Request for url" in str (exc_info .value )
153
+ """
174
154
175
155
176
156
@pytest .mark .online
@@ -192,13 +172,17 @@ def test_http_transport_verify_error(http_transport_query):
192
172
record [0 ].message
193
173
)
194
174
175
+ """
176
+ Batching is not supported anymore on countries backend
177
+
195
178
with pytest.warns(Warning) as record:
196
179
client.execute_batch([GraphQLRequest(document=http_transport_query)])
197
180
198
181
assert len(record) == 1
199
182
assert "Unverified HTTPS request is being made to host" in str(
200
183
record[0].message
201
184
)
185
+ """
202
186
203
187
204
188
@pytest .mark .online
@@ -215,28 +199,12 @@ def test_http_transport_specify_method_valid(http_transport_query):
215
199
result = client .execute (http_transport_query )
216
200
assert result is not None
217
201
202
+ """
203
+ Batching is not supported anymore on countries backend
204
+
218
205
result = client.execute_batch([GraphQLRequest(document=http_transport_query)])
219
206
assert result is not None
220
-
221
-
222
- @pytest .mark .online
223
- @pytest .mark .requests
224
- def test_http_transport_specify_method_invalid (http_transport_query ):
225
- from gql .transport .requests import RequestsHTTPTransport
226
-
227
- with Client (
228
- transport = RequestsHTTPTransport (
229
- url = "https://countries.trevorblades.com/" ,
230
- method = "GET" ,
231
- )
232
- ) as client :
233
- with pytest .raises (Exception ) as exc_info :
234
- client .execute (http_transport_query )
235
- assert "400 Client Error: Bad Request for url" in str (exc_info .value )
236
-
237
- with pytest .raises (Exception ) as exc_info :
238
- client .execute_batch ([GraphQLRequest (document = http_transport_query )])
239
- assert "400 Client Error: Bad Request for url" in str (exc_info .value )
207
+ """
240
208
241
209
242
210
def test_gql ():
0 commit comments