From 8f0994e65b2f78fd9c376e62bd3962d9a46bf0a8 Mon Sep 17 00:00:00 2001 From: Tomasz Kontusz Date: Sun, 15 Sep 2019 18:44:51 +0200 Subject: [PATCH] Fix test_should_preserve_prefetch_related Connection resolvers have access to pagination arguments. --- graphene_django/tests/test_query.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/graphene_django/tests/test_query.py b/graphene_django/tests/test_query.py index 97cdc56..a5238bf 100644 --- a/graphene_django/tests/test_query.py +++ b/graphene_django/tests/test_query.py @@ -1075,7 +1075,7 @@ def test_should_preserve_prefetch_related(django_assert_num_queries): class Query(graphene.ObjectType): films = DjangoConnectionField(FilmType) - def resolve_films(root, info): + def resolve_films(root, info, **args): qs = Film.objects.prefetch_related("reporters") return qs @@ -1107,7 +1107,7 @@ def test_should_preserve_prefetch_related(django_assert_num_queries): schema = graphene.Schema(query=Query) with django_assert_num_queries(3) as captured: result = schema.execute(query) - assert not result.errors + assert not result.errors def test_should_preserve_annotations(): @@ -1160,3 +1160,4 @@ def test_should_preserve_annotations(): } } assert result.data == expected, str(result.data) + assert not result.errors