mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-12 17:22:20 +03:00
Formatting
This commit is contained in:
parent
05d0864f4d
commit
2f750abcae
|
@ -1345,14 +1345,14 @@ def test_connection_should_enable_offset_filtering():
|
||||||
result = schema.execute(query)
|
result = schema.execute(query)
|
||||||
assert not result.errors
|
assert not result.errors
|
||||||
expected = {
|
expected = {
|
||||||
"allReporters": {
|
"allReporters": {"edges": [{"node": {"firstName": "Some", "lastName": "Guy"}},]}
|
||||||
"edges": [{"node": {"firstName": "Some", "lastName": "Guy"}}, ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
assert result.data == expected
|
assert result.data == expected
|
||||||
|
|
||||||
|
|
||||||
def test_connection_should_enable_offset_filtering_higher_than_max_limit(graphene_settings):
|
def test_connection_should_enable_offset_filtering_higher_than_max_limit(
|
||||||
|
graphene_settings,
|
||||||
|
):
|
||||||
graphene_settings.RELAY_CONNECTION_MAX_LIMIT = 2
|
graphene_settings.RELAY_CONNECTION_MAX_LIMIT = 2
|
||||||
Reporter.objects.create(first_name="John", last_name="Doe")
|
Reporter.objects.create(first_name="John", last_name="Doe")
|
||||||
Reporter.objects.create(first_name="Some", last_name="Guy")
|
Reporter.objects.create(first_name="Some", last_name="Guy")
|
||||||
|
@ -1385,7 +1385,7 @@ def test_connection_should_enable_offset_filtering_higher_than_max_limit(graphen
|
||||||
assert not result.errors
|
assert not result.errors
|
||||||
expected = {
|
expected = {
|
||||||
"allReporters": {
|
"allReporters": {
|
||||||
"edges": [{"node": {"firstName": "Some", "lastName": "Lady"}}, ]
|
"edges": [{"node": {"firstName": "Some", "lastName": "Lady"}},]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert result.data == expected
|
assert result.data == expected
|
||||||
|
@ -1452,8 +1452,6 @@ def test_connection_should_allow_offset_filtering_with_after():
|
||||||
result = schema.execute(query, variable_values=dict(after=after))
|
result = schema.execute(query, variable_values=dict(after=after))
|
||||||
assert not result.errors
|
assert not result.errors
|
||||||
expected = {
|
expected = {
|
||||||
"allReporters": {
|
"allReporters": {"edges": [{"node": {"firstName": "Jane", "lastName": "Roe"}},]}
|
||||||
"edges": [{"node": {"firstName": "Jane", "lastName": "Roe"}}, ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
assert result.data == expected
|
assert result.data == expected
|
||||||
|
|
Loading…
Reference in New Issue
Block a user