mirror of
				https://github.com/graphql-python/graphene-django.git
				synced 2025-10-31 16:07:36 +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 | .. code:: python | ||||||
| 
 | 
 | ||||||
|         # Create a fixture using the graphql_query helper and `client` fixture from `pytest-django`. |         # Create a fixture using the graphql_query helper and `client` fixture from `pytest-django`. | ||||||
|  |         import json | ||||||
|         import pytest |         import pytest | ||||||
|         from graphene_django.utils.testing import graphql_query |         from graphene_django.utils.testing import graphql_query | ||||||
| 
 | 
 | ||||||
|         @pytest.fixture |         @pytest.fixture | ||||||
|         def client_query(client) |         def client_query(client): | ||||||
|             def func(*args, **kwargs): |             def func(*args, **kwargs): | ||||||
|                 return graphql_query(*args, **kwargs, client=client) |                 return graphql_query(*args, **kwargs, client=client) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user