mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-13 09:42:32 +03:00
Cleanup some flake8 warnings and pytest warnings
This commit is contained in:
parent
d610166a79
commit
6089cff45f
|
@ -183,7 +183,7 @@ def test_filter_shortcut_filterset_context():
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
schema = Schema(query=Query)
|
schema = Schema(query=Query)
|
||||||
result = schema.execute(query, context_value=context())
|
result = schema.execute(query, context=context())
|
||||||
assert not result.errors
|
assert not result.errors
|
||||||
|
|
||||||
assert len(result.data["contextArticles"]["edges"]) == 1
|
assert len(result.data["contextArticles"]["edges"]) == 1
|
||||||
|
@ -462,15 +462,15 @@ def test_filter_filterset_related_results_with_filter():
|
||||||
class Query(ObjectType):
|
class Query(ObjectType):
|
||||||
all_reporters = DjangoFilterConnectionField(ReporterFilterNode)
|
all_reporters = DjangoFilterConnectionField(ReporterFilterNode)
|
||||||
|
|
||||||
r1 = Reporter.objects.create(
|
Reporter.objects.create(
|
||||||
first_name="A test user", last_name="Last Name", email="test1@test.com"
|
first_name="A test user", last_name="Last Name", email="test1@test.com"
|
||||||
)
|
)
|
||||||
r2 = Reporter.objects.create(
|
Reporter.objects.create(
|
||||||
first_name="Other test user",
|
first_name="Other test user",
|
||||||
last_name="Other Last Name",
|
last_name="Other Last Name",
|
||||||
email="test2@test.com",
|
email="test2@test.com",
|
||||||
)
|
)
|
||||||
r3 = Reporter.objects.create(
|
Reporter.objects.create(
|
||||||
first_name="Random", last_name="RandomLast", email="random@test.com"
|
first_name="Random", last_name="RandomLast", email="random@test.com"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -638,7 +638,7 @@ def test_should_query_filter_node_double_limit_raises():
|
||||||
Reporter.objects.create(
|
Reporter.objects.create(
|
||||||
first_name="Bob", last_name="Doe", email="bobdoe@example.com", a_choice=2
|
first_name="Bob", last_name="Doe", email="bobdoe@example.com", a_choice=2
|
||||||
)
|
)
|
||||||
r = Reporter.objects.create(
|
Reporter.objects.create(
|
||||||
first_name="John", last_name="Doe", email="johndoe@example.com", a_choice=1
|
first_name="John", last_name="Doe", email="johndoe@example.com", a_choice=1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -684,7 +684,7 @@ def test_order_by_is_perserved():
|
||||||
return reporters
|
return reporters
|
||||||
|
|
||||||
Reporter.objects.create(first_name="b")
|
Reporter.objects.create(first_name="b")
|
||||||
r = Reporter.objects.create(first_name="a")
|
Reporter.objects.create(first_name="a")
|
||||||
|
|
||||||
schema = Schema(query=Query)
|
schema = Schema(query=Query)
|
||||||
query = """
|
query = """
|
||||||
|
|
Loading…
Reference in New Issue
Block a user