Update testing.rst

This commit is contained in:
DJ Kim 2020-08-18 16:02:05 -07:00
parent 5b1451132d
commit 9b28519dee

View File

@ -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)