Fix asserts for errors that come back with visualised location

This commit is contained in:
Tomasz Kontusz 2019-09-15 18:30:00 +02:00
parent c7dea56e52
commit d6fd3fc4cc
2 changed files with 8 additions and 8 deletions

View File

@ -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"
)

View File

@ -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