Updated test

This commit is contained in:
Carlos Martinez 2017-03-28 20:00:39 -05:00
parent 2a12e39782
commit 69a1b35cfb

View File

@ -1,13 +1,24 @@
import collections
import graphene
import pytest
from graphene import Schema, relay, ObjectType
from django.test import TestCase, RequestFactory
from graphene_django import DjangoObjectType
from graphene_django.auth.mixins import AuthNodeMixin, AuthMutationMixin
from graphene_django.auth.fields import AuthDjangoFilterConnectionField
from django.core.exceptions import PermissionDenied
from .models import Pet
from graphene_django.utils import DJANGO_FILTER_INSTALLED
pytestmark = []
if DJANGO_FILTER_INSTALLED:
from graphene_django.auth.fields import AuthDjangoFilterConnectionField
else:
pytestmark.append(pytest.mark.skipif(True, reason='django_filters not installed'))
pytestmark.append(pytest.mark.django_db)
class PetNode(AuthNodeMixin, DjangoObjectType):
_permission = 'app.view_pet'