mirror of
				https://github.com/graphql-python/graphene-django.git
				synced 2025-11-04 01:47:57 +03:00 
			
		
		
		
	update GraphQLTestCase.query docstring and remove type check
This commit is contained in:
		
							parent
							
								
									cb2cf513c0
								
							
						
					
					
						commit
						e8233964f0
					
				| 
						 | 
					@ -32,7 +32,11 @@ class GraphQLTestCase(TestCase):
 | 
				
			||||||
                                supply the op_name.  For annon queries ("{ ... }"),
 | 
					                                supply the op_name.  For annon queries ("{ ... }"),
 | 
				
			||||||
                                should be None (default).
 | 
					                                should be None (default).
 | 
				
			||||||
            input_data (dict) - If provided, the $input variable in GraphQL will be set
 | 
					            input_data (dict) - If provided, the $input variable in GraphQL will be set
 | 
				
			||||||
                                to this value
 | 
					                                to this value. If both ``input_data`` and ``variables``, 
 | 
				
			||||||
 | 
					                                are provided, the ``input`` field in the ``variables``
 | 
				
			||||||
 | 
					                                dict will be overwritten with this value.
 | 
				
			||||||
 | 
					            variables (dict)  - If provided, the "variables" field in GraphQL will be
 | 
				
			||||||
 | 
					                                set to this value. 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        Returns:
 | 
					        Returns:
 | 
				
			||||||
            Response object from client
 | 
					            Response object from client
 | 
				
			||||||
| 
						 | 
					@ -43,7 +47,7 @@ class GraphQLTestCase(TestCase):
 | 
				
			||||||
        if variables:
 | 
					        if variables:
 | 
				
			||||||
            body["variables"] = variables
 | 
					            body["variables"] = variables
 | 
				
			||||||
        if input_data:
 | 
					        if input_data:
 | 
				
			||||||
            if variables in body and isinstance(body, dict):
 | 
					            if variables in body:
 | 
				
			||||||
                body["variables"]["input"] = input_data
 | 
					                body["variables"]["input"] = input_data
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                body["variables"] = {"input": input_data}
 | 
					                body["variables"] = {"input": input_data}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user