summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-06-27 19:39:20 -0400
committerTim Graham <timograham@gmail.com>2013-06-27 19:39:20 -0400
commit534ced5aadf964eca4cf29a689dc70185f582772 (patch)
treed3e8a4fceea1476d15b570029d0a74eb95a921c9 /tests
parentc1284c3d3c6131a9d0ded9601ae0feb9a2e81a65 (diff)
Fixed #20664 -- Fixed a bug with raw_id_fields on Python 3.
Thanks jefftriplett for the report.
Diffstat (limited to 'tests')
-rw-r--r--tests/admin_views/tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index 064979801e..a695d50ea2 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -583,6 +583,14 @@ class AdminViewBasicTest(TestCase):
response = self.client.get("/test_admin/admin/admin_views/inquisition/?leader__name=Palin&leader__age=27")
self.assertEqual(response.status_code, 200)
+ def test_popup_dismiss_related(self):
+ """
+ Regression test for ticket 20664 - ensure the pk is properly quoted.
+ """
+ actor = Actor.objects.create(name="Palin", age=27)
+ response = self.client.get("/test_admin/admin/admin_views/actor/?%s" % IS_POPUP_VAR)
+ self.assertContains(response, "opener.dismissRelatedLookupPopup(window, &#39;%s&#39;)" % actor.pk)
+
def test_hide_change_password(self):
"""
Tests if the "change password" link in the admin is hidden if the User