diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-05-08 16:12:51 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-05-08 16:12:51 +0000 |
| commit | 8397c1fdfacc3dfffd77903e30127c05e1968ac6 (patch) | |
| tree | e2ec9bf1720a25560479aa1e61c175577e32f8ef /tests | |
| parent | 41ba8e7ca6c0cd089cf196207ec136e815721399 (diff) | |
[1.0.X] Fixed #10899 -- Ensured that log messages for deletions in the admin contain useful descriptions. Thanks to Jeremy Dunck for the patch.
Merge of r10686 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10720 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/admin_views/tests.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/regressiontests/admin_views/tests.py b/tests/regressiontests/admin_views/tests.py index f11b241a10..2629552ab8 100644 --- a/tests/regressiontests/admin_views/tests.py +++ b/tests/regressiontests/admin_views/tests.py @@ -6,7 +6,7 @@ from django.core.files import temp as tempfile from django.test import TestCase from django.contrib.auth.models import User, Permission from django.contrib.contenttypes.models import ContentType -from django.contrib.admin.models import LogEntry +from django.contrib.admin.models import LogEntry, DELETION from django.contrib.admin.sites import LOGIN_FORM_KEY from django.contrib.admin.util import quote from django.utils.html import escape @@ -557,6 +557,9 @@ class AdminViewPermissionsTest(TestCase): post = self.client.post('/test_admin/admin/admin_views/article/1/delete/', delete_dict) self.assertRedirects(post, '/test_admin/admin/') self.failUnlessEqual(Article.objects.all().count(), 2) + article_ct = ContentType.objects.get_for_model(Article) + logged = LogEntry.objects.get(content_type=article_ct, action_flag=DELETION) + self.failUnlessEqual(logged.object_id, u'1') self.client.get('/test_admin/admin/logout/') class AdminViewStringPrimaryKeyTest(TestCase): |
