Skip to content

Commit

Permalink
Remove 2 flaky online tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leszekhanusz committed Jan 2, 2024
1 parent 170df4d commit fbcce40
Showing 1 changed file with 0 additions and 51 deletions.
51 changes: 0 additions & 51 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,33 +153,6 @@ def test_execute_result_error():
"""


@pytest.mark.online
@pytest.mark.requests
def test_http_transport_raise_for_status_error(http_transport_query):
from gql.transport.requests import RequestsHTTPTransport

with Client(
transport=RequestsHTTPTransport(
url="https://countries.trevorblades.com/",
use_json=False,
headers={"Content-type": "application/json"},
)
) as client:
with pytest.raises(Exception) as exc_info:
client.execute(http_transport_query)

assert "400 Client Error: Bad Request for url" in str(exc_info.value)

"""
Batching is not supported anymore on countries backend
with pytest.raises(Exception) as exc_info:
client.execute_batch([GraphQLRequest(document=http_transport_query)])
assert "400 Client Error: Bad Request for url" in str(exc_info.value)
"""


@pytest.mark.online
@pytest.mark.requests
def test_http_transport_verify_error(http_transport_query):
Expand Down Expand Up @@ -234,30 +207,6 @@ def test_http_transport_specify_method_valid(http_transport_query):
"""


@pytest.mark.online
@pytest.mark.requests
def test_http_transport_specify_method_invalid(http_transport_query):
from gql.transport.requests import RequestsHTTPTransport

with Client(
transport=RequestsHTTPTransport(
url="https://countries.trevorblades.com/",
method="GET",
)
) as client:
with pytest.raises(Exception) as exc_info:
client.execute(http_transport_query)
assert "400 Client Error: Bad Request for url" in str(exc_info.value)

"""
Batching is not supported anymore on countries backend
with pytest.raises(Exception) as exc_info:
client.execute_batch([GraphQLRequest(document=http_transport_query)])
assert "400 Client Error: Bad Request for url" in str(exc_info.value)
"""


def test_gql():
sample_path = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
Expand Down

0 comments on commit fbcce40

Please sign in to comment.