From cd10971aa4b96e527eac909f540fad208f09e320 Mon Sep 17 00:00:00 2001 From: Carlos Martinez Date: Tue, 28 Mar 2017 20:05:15 -0500 Subject: [PATCH] Update test if django_filters is not installed (Django 1.6 and Django 1.7) --- graphene_django/tests/test_auth.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/graphene_django/tests/test_auth.py b/graphene_django/tests/test_auth.py index 6921c4f..65da856 100644 --- a/graphene_django/tests/test_auth.py +++ b/graphene_django/tests/test_auth.py @@ -91,13 +91,13 @@ class CreatePetMultiple(AuthMutationMixin, graphene.Mutation): pet = Pet.objects.create(name=pet_name) return CreatePet(pet=pet) - -class PetFilterConnection(AuthDjangoFilterConnectionField): - _permission = 'app.create_pet' +if DJANGO_FILTER_INSTALLED: + class PetFilterConnection(AuthDjangoFilterConnectionField): + _permission = 'app.create_pet' -class PetFilterConnectionMultiple(AuthDjangoFilterConnectionField): - _permission = ('app.view_pet', 'app.add_pet') + class PetFilterConnectionMultiple(AuthDjangoFilterConnectionField): + _permission = ('app.view_pet', 'app.add_pet') class QueryRoot(ObjectType):