From 59ae68e8883fcccebfda84a1f4bfba56a8b6cc2d Mon Sep 17 00:00:00 2001 From: jlaine Date: Sat, 25 Dec 2010 08:39:43 +0000 Subject: [PATCH] test adding a group from admin interface git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@964 e071eeec-0327-468d-9b6a-08194a12b294 --- examples/tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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') -- 2.30.2