mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-05-16 13:53:53 +03:00
Fix asserts for errors that come back with visualised location
This commit is contained in:
parent
c7dea56e52
commit
d6fd3fc4cc
|
@ -657,8 +657,8 @@ def test_should_query_filter_node_double_limit_raises():
|
|||
|
||||
result = schema.execute(query)
|
||||
assert len(result.errors) == 1
|
||||
assert str(result.errors[0]) == (
|
||||
"Received two sliced querysets (high mark) in the connection, please slice only in one."
|
||||
assert str(result.errors[0]).startswith(
|
||||
"Received two sliced querysets (high mark) in the connection, please slice only in one.\n"
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -620,9 +620,9 @@ def test_should_enforce_first_or_last():
|
|||
|
||||
result = schema.execute(query)
|
||||
assert len(result.errors) == 1
|
||||
assert str(result.errors[0]) == (
|
||||
assert str(result.errors[0]).startswith(
|
||||
"You must provide a `first` or `last` value to properly "
|
||||
"paginate the `allReporters` connection."
|
||||
"paginate the `allReporters` connection.\n"
|
||||
)
|
||||
assert result.data == expected
|
||||
|
||||
|
@ -659,9 +659,9 @@ def test_should_error_if_first_is_greater_than_max():
|
|||
|
||||
result = schema.execute(query)
|
||||
assert len(result.errors) == 1
|
||||
assert str(result.errors[0]) == (
|
||||
assert str(result.errors[0]).startswith(
|
||||
"Requesting 101 records on the `allReporters` connection "
|
||||
"exceeds the `first` limit of 100 records."
|
||||
"exceeds the `first` limit of 100 records.\n"
|
||||
)
|
||||
assert result.data == expected
|
||||
|
||||
|
@ -700,9 +700,9 @@ def test_should_error_if_last_is_greater_than_max():
|
|||
|
||||
result = schema.execute(query)
|
||||
assert len(result.errors) == 1
|
||||
assert str(result.errors[0]) == (
|
||||
assert str(result.errors[0]).startswith(
|
||||
"Requesting 101 records on the `allReporters` connection "
|
||||
"exceeds the `last` limit of 100 records."
|
||||
"exceeds the `last` limit of 100 records.\n"
|
||||
)
|
||||
assert result.data == expected
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user