Update test if django_filters is not installed (Django 1.6 and Django 1.7)

This commit is contained in:
Carlos Martinez 2017-03-28 20:05:15 -05:00
parent 69a1b35cfb
commit cd10971aa4

View File

@ -91,12 +91,12 @@ class CreatePetMultiple(AuthMutationMixin, graphene.Mutation):
pet = Pet.objects.create(name=pet_name)
return CreatePet(pet=pet)
class PetFilterConnection(AuthDjangoFilterConnectionField):
if DJANGO_FILTER_INSTALLED:
class PetFilterConnection(AuthDjangoFilterConnectionField):
_permission = 'app.create_pet'
class PetFilterConnectionMultiple(AuthDjangoFilterConnectionField):
class PetFilterConnectionMultiple(AuthDjangoFilterConnectionField):
_permission = ('app.view_pet', 'app.add_pet')