Skip to content

Commit b3fbac5

Browse files
committed
Fixed tests
1 parent 2e1f154 commit b3fbac5

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

graphene_django/filter/tests/test_fields.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from graphene_django.utils import DJANGO_FILTER_INSTALLED
1212

1313
pytestmark = []
14+
1415
if DJANGO_FILTER_INSTALLED:
1516
import django_filters
1617
from graphene_django.filter import (GlobalIDFilter, DjangoFilterConnectionField,
@@ -22,28 +23,29 @@
2223
pytestmark.append(pytest.mark.django_db)
2324

2425

25-
class ArticleNode(DjangoObjectType):
26+
if DJANGO_FILTER_INSTALLED:
27+
class ArticleNode(DjangoObjectType):
2628

27-
class Meta:
28-
model = Article
29-
interfaces = (Node, )
30-
filter_fields = ('headline', )
29+
class Meta:
30+
model = Article
31+
interfaces = (Node, )
32+
filter_fields = ('headline', )
3133

3234

33-
class ReporterNode(DjangoObjectType):
35+
class ReporterNode(DjangoObjectType):
3436

35-
class Meta:
36-
model = Reporter
37-
interfaces = (Node, )
37+
class Meta:
38+
model = Reporter
39+
interfaces = (Node, )
3840

3941

40-
class PetNode(DjangoObjectType):
42+
class PetNode(DjangoObjectType):
4143

42-
class Meta:
43-
model = Pet
44-
interfaces = (Node, )
44+
class Meta:
45+
model = Pet
46+
interfaces = (Node, )
4547

46-
# schema = Schema()
48+
# schema = Schema()
4749

4850

4951
def get_args(field):

0 commit comments

Comments
 (0)