Skip to content

Commit b5a450c

Browse files
author
Pablo Chinea
committed
Fixes nested node test when django-filter is not installed.
1 parent dfb55cd commit b5a450c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

graphene_django/tests/test_query.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import graphene
99
from graphene.relay import Node
1010

11+
from ..utils import DJANGO_FILTER_INSTALLED
1112
from ..compat import MissingType, RangeField
1213
from ..fields import DjangoConnectionField
1314
from ..types import DjangoObjectType
@@ -282,6 +283,9 @@ def resolve_all_reporters(self, args, context, info):
282283
}
283284
}
284285

286+
287+
@pytest.mark.skipif(not DJANGO_FILTER_INSTALLED,
288+
reason="django-filter should be installed")
285289
def test_should_query_node_filtering():
286290
class ReporterType(DjangoObjectType):
287291

@@ -320,7 +324,6 @@ class Query(graphene.ObjectType):
320324
lang='en'
321325
)
322326

323-
324327
schema = graphene.Schema(query=Query)
325328
query = '''
326329
query NodeFilteringQuery {

0 commit comments

Comments
 (0)