Fix tests

This commit is contained in:
Jonathan Kim 2019-12-27 16:10:38 +00:00
parent 4f6e017b6c
commit 14ab75de06

View File

@ -2,7 +2,7 @@ from django import forms
from django.test import TestCase from django.test import TestCase
from py.test import raises from py.test import raises
from graphene import ObjectType, Schema, String from graphene import ObjectType, Schema, String, Field
from graphene_django import DjangoObjectType from graphene_django import DjangoObjectType
from graphene_django.tests.models import Film, FilmDetails, Pet from graphene_django.tests.models import Film, FilmDetails, Pet
@ -139,6 +139,8 @@ class ModelFormMutationTests(TestCase):
def test_model_form_mutation_mutate_existing(self): def test_model_form_mutation_mutate_existing(self):
class PetMutation(DjangoModelFormMutation): class PetMutation(DjangoModelFormMutation):
pet = Field(PetType)
class Meta: class Meta:
form_class = PetForm form_class = PetForm
@ -171,6 +173,8 @@ class ModelFormMutationTests(TestCase):
def test_model_form_mutation_creates_new(self): def test_model_form_mutation_creates_new(self):
class PetMutation(DjangoModelFormMutation): class PetMutation(DjangoModelFormMutation):
pet = Field(PetType)
class Meta: class Meta:
form_class = PetForm form_class = PetForm