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,13 +91,13 @@ class CreatePetMultiple(AuthMutationMixin, graphene.Mutation):
pet = Pet.objects.create(name=pet_name) pet = Pet.objects.create(name=pet_name)
return CreatePet(pet=pet) return CreatePet(pet=pet)
if DJANGO_FILTER_INSTALLED:
class PetFilterConnection(AuthDjangoFilterConnectionField): class PetFilterConnection(AuthDjangoFilterConnectionField):
_permission = 'app.create_pet' _permission = 'app.create_pet'
class PetFilterConnectionMultiple(AuthDjangoFilterConnectionField): class PetFilterConnectionMultiple(AuthDjangoFilterConnectionField):
_permission = ('app.view_pet', 'app.add_pet') _permission = ('app.view_pet', 'app.add_pet')
class QueryRoot(ObjectType): class QueryRoot(ObjectType):