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):