mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #11776 -- Added CSS class for non-field/top of form errors.
Thanks Daniel Pope for the suggestion.
This commit is contained in:
@@ -2035,7 +2035,7 @@ class AdminViewListEditable(TestCase):
|
||||
"_save": "Save",
|
||||
}
|
||||
response = self.client.post('/test_admin/admin/admin_views/fooddelivery/', data)
|
||||
self.assertContains(response, '<tr><td colspan="4"><ul class="errorlist"><li>Food delivery with this Driver and Restaurant already exists.</li></ul></td></tr>', 1, html=True)
|
||||
self.assertContains(response, '<tr><td colspan="4"><ul class="errorlist nonfield"><li>Food delivery with this Driver and Restaurant already exists.</li></ul></td></tr>', 1, html=True)
|
||||
|
||||
data = {
|
||||
"form-TOTAL_FORMS": "3",
|
||||
@@ -2062,7 +2062,7 @@ class AdminViewListEditable(TestCase):
|
||||
"_save": "Save",
|
||||
}
|
||||
response = self.client.post('/test_admin/admin/admin_views/fooddelivery/', data)
|
||||
self.assertContains(response, '<tr><td colspan="4"><ul class="errorlist"><li>Food delivery with this Driver and Restaurant already exists.</li></ul></td></tr>', 2, html=True)
|
||||
self.assertContains(response, '<tr><td colspan="4"><ul class="errorlist nonfield"><li>Food delivery with this Driver and Restaurant already exists.</li></ul></td></tr>', 2, html=True)
|
||||
|
||||
def test_non_form_errors(self):
|
||||
# test if non-form errors are handled; ticket #12716
|
||||
|
||||
Reference in New Issue
Block a user