From: jlaine Date: Sat, 25 Dec 2010 08:39:43 +0000 (+0000) Subject: test adding a group from admin interface X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=59ae68e8883fcccebfda84a1f4bfba56a8b6cc2d;p=matthijs%2Fupstream%2Fdjango-ldapdb.git test adding a group from admin interface git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@964 e071eeec-0327-468d-9b6a-08194a12b294 --- diff --git a/examples/tests.py b/examples/tests.py index 92d9473..0905e12 100644 --- a/examples/tests.py +++ b/examples/tests.py @@ -376,9 +376,17 @@ class AdminTestCase(BaseTestCase): self.assertContains(response, "foogroup") self.assertContains(response, "1000") + def test_group_add(self): + response = self.client.post('/admin/examples/ldapgroup/add/', {'gid': '1002', 'name': 'wizgroup'}) + self.assertRedirects(response, '/admin/examples/ldapgroup/') + qs = LdapGroup.objects.all() + self.assertEquals(qs.count(), 3) + def test_group_delete(self): response = self.client.post('/admin/examples/ldapgroup/foogroup/delete/', {'yes': 'post'}) self.assertRedirects(response, '/admin/examples/ldapgroup/') + qs = LdapGroup.objects.all() + self.assertEquals(qs.count(), 1) def test_group_search(self): response = self.client.get('/admin/examples/ldapgroup/?q=foo')