Fixes nested node test when django-filter is not installed.

This commit is contained in:
Pablo Chinea 2016-12-30 09:57:50 +00:00
parent dfb55cda6b
commit b5a450cb6d

View File

@ -8,6 +8,7 @@ from py.test import raises
import graphene
from graphene.relay import Node
from ..utils import DJANGO_FILTER_INSTALLED
from ..compat import MissingType, RangeField
from ..fields import DjangoConnectionField
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():
class ReporterType(DjangoObjectType):
@ -320,7 +324,6 @@ def test_should_query_node_filtering():
lang='en'
)
schema = graphene.Schema(query=Query)
query = '''
query NodeFilteringQuery {