@@ -46,7 +46,6 @@ def execute(self):
4646
4747
4848@pytest .mark .aiohttp
49- @pytest .mark .asyncio
5049def test_request_async_execute_batch_not_implemented_yet ():
5150 from gql .transport .aiohttp import AIOHTTPTransport
5251
@@ -145,32 +144,13 @@ def test_execute_result_error():
145144 client .execute (failing_query )
146145 assert 'Cannot query field "id" on type "Continent".' in str (exc_info .value )
147146
147+ """
148+ Batching is not supported anymore on countries backend
149+
148150 with pytest.raises(TransportQueryError) as exc_info:
149151 client.execute_batch([GraphQLRequest(document=failing_query)])
150152 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+ """
174154
175155
176156@pytest .mark .online
@@ -192,13 +172,17 @@ def test_http_transport_verify_error(http_transport_query):
192172 record [0 ].message
193173 )
194174
175+ """
176+ Batching is not supported anymore on countries backend
177+
195178 with pytest.warns(Warning) as record:
196179 client.execute_batch([GraphQLRequest(document=http_transport_query)])
197180
198181 assert len(record) == 1
199182 assert "Unverified HTTPS request is being made to host" in str(
200183 record[0].message
201184 )
185+ """
202186
203187
204188@pytest .mark .online
@@ -215,28 +199,12 @@ def test_http_transport_specify_method_valid(http_transport_query):
215199 result = client .execute (http_transport_query )
216200 assert result is not None
217201
202+ """
203+ Batching is not supported anymore on countries backend
204+
218205 result = client.execute_batch([GraphQLRequest(document=http_transport_query)])
219206 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+ """
240208
241209
242210def test_gql ():
0 commit comments