summaryrefslogtreecommitdiff
path: root/tests/admin_views
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2015-01-08 16:58:23 +0100
committerMarkus Holtermann <info@markusholtermann.eu>2015-01-16 20:21:34 +0100
commitb4ac23290772e0c11379eb2dfb81c750b7052b66 (patch)
tree9dcb8c6c65589f9074b11547ba6529d9f273f46c /tests/admin_views
parent374c2419e5adef53a643bf69c4753a6bf0c78a98 (diff)
Fixed #24099 -- Removed contenttype.name deprecated field
This finsishes the work started on #16803. Thanks Simon Charette, Tim Graham and Collin Anderson for the reviews.
Diffstat (limited to 'tests/admin_views')
-rw-r--r--tests/admin_views/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index f991982fe5..0c28ecc029 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -1974,7 +1974,7 @@ class AdminViewStringPrimaryKeyTest(TestCase):
self.assertContains(response, should_contain)
should_contain = "Model with string primary key" # capitalized in Recent Actions
self.assertContains(response, should_contain)
- logentry = LogEntry.objects.get(content_type__name__iexact=should_contain)
+ logentry = LogEntry.objects.get(content_type__model__iexact='modelwithstringprimarykey')
# http://code.djangoproject.com/ticket/10275
# if the log entry doesn't have a content type it should still be
# possible to view the Recent Actions part
@@ -1989,8 +1989,8 @@ class AdminViewStringPrimaryKeyTest(TestCase):
def test_logentry_get_admin_url(self):
"LogEntry.get_admin_url returns a URL to edit the entry's object or None for non-existent (possibly deleted) models"
- log_entry_name = "Model with string primary key" # capitalized in Recent Actions
- logentry = LogEntry.objects.get(content_type__name__iexact=log_entry_name)
+ log_entry_model = "modelwithstringprimarykey" # capitalized in Recent Actions
+ logentry = LogEntry.objects.get(content_type__model__iexact=log_entry_model)
model = "modelwithstringprimarykey"
desired_admin_url = "/test_admin/admin/admin_views/%s/%s/" % (model, iri_to_uri(quote(self.pk)))
self.assertEqual(logentry.get_admin_url(), desired_admin_url)