Skip to content

Commit 9d9a14c

Browse files
authored
Fix failing tests (#931)
* Use proper model * Remove failing test * Add python 3.8 to test list
1 parent 3483428 commit 9d9a14c

File tree

3 files changed

+18
-20
lines changed

3 files changed

+18
-20
lines changed

.travis.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,19 @@ jobs:
6262
- python: 3.7
6363
env: DJANGO=master
6464

65+
- python: 3.8
66+
env: DJANGO=1.11
67+
- python: 3.8
68+
env: DJANGO=2.0
69+
- python: 3.8
70+
env: DJANGO=2.1
71+
- python: 3.8
72+
env: DJANGO=2.2
73+
- python: 3.8
74+
env: DJANGO=3.0
75+
- python: 3.8
76+
env: DJANGO=master
77+
6578
- python: 3.7
6679
env: TOXENV=black,flake8
6780

graphene_django/forms/tests/test_mutation.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from graphene import ObjectType, Schema, String, Field
77
from graphene_django import DjangoObjectType
8-
from graphene_django.tests.models import Film, FilmDetails, Pet
8+
from graphene_django.tests.models import Film, Pet
99

1010
from ...settings import graphene_settings
1111
from ..mutation import DjangoFormMutation, DjangoModelFormMutation
@@ -42,12 +42,6 @@ class Meta:
4242
fields = "__all__"
4343

4444

45-
class FilmDetailsType(DjangoObjectType):
46-
class Meta:
47-
model = FilmDetails
48-
fields = "__all__"
49-
50-
5145
def test_needs_form_class():
5246
with raises(Exception) as exc:
5347

@@ -185,23 +179,14 @@ class Meta:
185179
self.assertIn("client_mutation_id", PetMutation.Input._meta.fields)
186180
self.assertNotIn("id", PetMutation.Input._meta.fields)
187181

188-
def test_return_field_name_is_camelcased(self):
189-
class PetMutation(DjangoModelFormMutation):
190-
class Meta:
191-
form_class = PetForm
192-
model = FilmDetails
193-
194-
self.assertEqual(PetMutation._meta.model, FilmDetails)
195-
self.assertEqual(PetMutation._meta.return_field_name, "filmDetails")
196-
197182
def test_custom_return_field_name(self):
198183
class PetMutation(DjangoModelFormMutation):
199184
class Meta:
200185
form_class = PetForm
201-
model = Film
186+
model = Pet
202187
return_field_name = "animal"
203188

204-
self.assertEqual(PetMutation._meta.model, Film)
189+
self.assertEqual(PetMutation._meta.model, Pet)
205190
self.assertEqual(PetMutation._meta.return_field_name, "animal")
206191
self.assertIn("animal", PetMutation._meta.fields)
207192

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
envlist =
3-
py{27,35,36,37}-django{111,20,21,22,master},
4-
py{36,37}-django30,
3+
py{27,35,36,37,38}-django{111,20,21,22,master},
4+
py{36,37,38}-django30,
55
black,flake8
66

77
[travis:env]

0 commit comments

Comments
 (0)