diff --git a/docs/testing.rst b/docs/testing.rst index 23acef2d4..e18f61a1f 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -90,11 +90,12 @@ To use pytest define a simple fixture using the query helper below .. code:: python # Create a fixture using the graphql_query helper and `client` fixture from `pytest-django`. + import json import pytest from graphene_django.utils.testing import graphql_query @pytest.fixture - def client_query(client) + def client_query(client): def func(*args, **kwargs): return graphql_query(*args, **kwargs, client=client)