mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-15 14:42:06 +03:00
Update testing.rst
This commit is contained in:
parent
5b1451132d
commit
9b28519dee
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user