1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Added missing tests for fix committed in r12398. Thanks Karen for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel
2010-02-16 12:17:37 +00:00
parent 12d40a9fd6
commit 342517000c
2 changed files with 29 additions and 0 deletions

View File

@@ -992,6 +992,20 @@ class AdminViewListEditable(TestCase):
self.failUnlessEqual(Person.objects.get(name="John Mauchly").alive, False)
def test_non_form_errors(self):
# test if non-form errors are handled; ticket #12716
data = {
"form-TOTAL_FORMS": "1",
"form-INITIAL_FORMS": "1",
"form-MAX_NUM_FORMS": "0",
"form-0-id": "2",
"form-0-alive": "1",
"form-0-gender": "2",
}
response = self.client.post('/test_admin/admin/admin_views/person/', data)
self.assertContains(response, "Grace is not a Zombie")
def test_list_editable_ordering(self):
collector = Collector.objects.create(id=1, name="Frederick Clegg")