mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-01-31 11:48:38 +03:00
Fix tests.
This commit is contained in:
parent
c1bd3c4c15
commit
d4a9c2bb89
|
@ -132,8 +132,10 @@ class ModelFormMutationTests(TestCase):
|
|||
# A pet was not created
|
||||
self.assertEqual(Pet.objects.count(), 0)
|
||||
|
||||
|
||||
fields_w_error = [e.field for e in result.errors]
|
||||
self.assertEqual(len(result.errors), 2)
|
||||
self.assertEqual(result.errors[0].field, "name")
|
||||
self.assertIn("name", fields_w_error)
|
||||
self.assertEqual(result.errors[0].messages, ["This field is required."])
|
||||
self.assertEqual(result.errors[1].field, "age")
|
||||
self.assertIn("age", fields_w_error)
|
||||
self.assertEqual(result.errors[1].messages, ["This field is required."])
|
||||
|
|
Loading…
Reference in New Issue
Block a user