diff --git a/graphene_django/filter/tests/test_fields.py b/graphene_django/filter/tests/test_fields.py index 661564f..f9b8fa0 100644 --- a/graphene_django/filter/tests/test_fields.py +++ b/graphene_django/filter/tests/test_fields.py @@ -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" ) diff --git a/graphene_django/tests/test_query.py b/graphene_django/tests/test_query.py index f24f84b..4fdb81f 100644 --- a/graphene_django/tests/test_query.py +++ b/graphene_django/tests/test_query.py @@ -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