1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #32905 -- Added CSS class for non-form errors of formsets.

This commit is contained in:
Ties Jan Hefting
2021-07-07 22:50:30 +02:00
committed by Mariusz Felisiak
parent 7f33c1e22d
commit 84400d2e9d
6 changed files with 42 additions and 3 deletions

View File

@@ -3348,7 +3348,10 @@ class AdminViewListEditable(TestCase):
response = self.client.post(reverse('admin:admin_views_person_changelist'), data)
non_form_errors = response.context['cl'].formset.non_form_errors()
self.assertIsInstance(non_form_errors, ErrorList)
self.assertEqual(str(non_form_errors), str(ErrorList(["Grace is not a Zombie"])))
self.assertEqual(
str(non_form_errors),
str(ErrorList(['Grace is not a Zombie'], error_class='nonform')),
)
def test_list_editable_ordering(self):
collector = Collector.objects.create(id=1, name="Frederick Clegg")