mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-16 07:02:04 +03:00
Fix GraphQLView tests, skip some of them
Some of the tests show the problem described here: https://github.com/graphql-python/graphql-core-next/issues/61
This commit is contained in:
parent
10269267a4
commit
758f326375
|
@ -92,6 +92,9 @@ def test_allows_get_with_operation_name(client):
|
|||
}
|
||||
|
||||
|
||||
@pytest.mark.xfail(
|
||||
reason="SourceLocation serialization problem: https://github.com/graphql-python/graphql-core-next/issues/61"
|
||||
)
|
||||
def test_reports_validation_errors(client):
|
||||
response = client.get(url_string(query="{ test, unknownOne, unknownTwo }"))
|
||||
|
||||
|
@ -99,12 +102,14 @@ def test_reports_validation_errors(client):
|
|||
assert response_json(response) == {
|
||||
"errors": [
|
||||
{
|
||||
"message": 'Cannot query field "unknownOne" on type "QueryRoot".',
|
||||
"message": "Cannot query field 'unknownOne' on type 'QueryRoot'.",
|
||||
"locations": [{"line": 1, "column": 9}],
|
||||
"path": None,
|
||||
},
|
||||
{
|
||||
"message": 'Cannot query field "unknownTwo" on type "QueryRoot".',
|
||||
"message": "Cannot query field 'unknownTwo' on type 'QueryRoot'.",
|
||||
"locations": [{"line": 1, "column": 21}],
|
||||
"path": None,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
@ -124,7 +129,9 @@ def test_errors_when_missing_operation_name(client):
|
|||
assert response_json(response) == {
|
||||
"errors": [
|
||||
{
|
||||
"message": "Must provide operation name if query contains multiple operations."
|
||||
"locations": None,
|
||||
"message": "Must provide operation name if query contains multiple operations.",
|
||||
"path": None,
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -442,6 +449,9 @@ def test_supports_pretty_printing_by_request(client):
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.xfail(
|
||||
reason="SourceLocation serialization problem: https://github.com/graphql-python/graphql-core-next/issues/61"
|
||||
)
|
||||
def test_handles_field_errors_caught_by_graphql(client):
|
||||
response = client.get(url_string(query="{thrower}"))
|
||||
assert response.status_code == 200
|
||||
|
@ -457,6 +467,9 @@ def test_handles_field_errors_caught_by_graphql(client):
|
|||
}
|
||||
|
||||
|
||||
@pytest.mark.xfail(
|
||||
reason="SourceLocation serialization problem: https://github.com/graphql-python/graphql-core-next/issues/61"
|
||||
)
|
||||
def test_handles_syntax_errors_caught_by_graphql(client):
|
||||
response = client.get(url_string(query="syntaxerror"))
|
||||
assert response.status_code == 400
|
||||
|
|
Loading…
Reference in New Issue
Block a user