mirror of
				https://github.com/graphql-python/graphene-django.git
				synced 2025-11-04 01:47:57 +03:00 
			
		
		
		
	Fixes nested node test when django-filter is not installed.
This commit is contained in:
		
							parent
							
								
									dfb55cda6b
								
							
						
					
					
						commit
						b5a450cb6d
					
				| 
						 | 
					@ -8,6 +8,7 @@ from py.test import raises
 | 
				
			||||||
import graphene
 | 
					import graphene
 | 
				
			||||||
from graphene.relay import Node
 | 
					from graphene.relay import Node
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from ..utils import DJANGO_FILTER_INSTALLED
 | 
				
			||||||
from ..compat import MissingType, RangeField
 | 
					from ..compat import MissingType, RangeField
 | 
				
			||||||
from ..fields import DjangoConnectionField
 | 
					from ..fields import DjangoConnectionField
 | 
				
			||||||
from ..types import DjangoObjectType
 | 
					from ..types import DjangoObjectType
 | 
				
			||||||
| 
						 | 
					@ -282,6 +283,9 @@ def test_should_query_connectionfields():
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@pytest.mark.skipif(not DJANGO_FILTER_INSTALLED,
 | 
				
			||||||
 | 
					                    reason="django-filter should be installed")
 | 
				
			||||||
def test_should_query_node_filtering():
 | 
					def test_should_query_node_filtering():
 | 
				
			||||||
    class ReporterType(DjangoObjectType):
 | 
					    class ReporterType(DjangoObjectType):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -320,7 +324,6 @@ def test_should_query_node_filtering():
 | 
				
			||||||
        lang='en'
 | 
					        lang='en'
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    schema = graphene.Schema(query=Query)
 | 
					    schema = graphene.Schema(query=Query)
 | 
				
			||||||
    query = '''
 | 
					    query = '''
 | 
				
			||||||
        query NodeFilteringQuery {
 | 
					        query NodeFilteringQuery {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user