summaryrefslogtreecommitdiff
path: root/tests/regressiontests/admin_widgets/tests.py
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2009-03-30 23:16:34 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2009-03-30 23:16:34 +0000
commit4378af21b6e363e0499165c7440f34923c73194f (patch)
treea8a0505227cff00d51a5fe395ca1a4fa3eea30ec /tests/regressiontests/admin_widgets/tests.py
parent4e035a03b653889dac1bc20b0bb67890f2969ec7 (diff)
Fixed #10537: Fixed the foreign key add-another link in list_editable. Thanks, Alex and jezdez.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10235 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/admin_widgets/tests.py')
-rw-r--r--tests/regressiontests/admin_widgets/tests.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/regressiontests/admin_widgets/tests.py b/tests/regressiontests/admin_widgets/tests.py
index 4dc2930e3b..c2b040368d 100644
--- a/tests/regressiontests/admin_widgets/tests.py
+++ b/tests/regressiontests/admin_widgets/tests.py
@@ -110,3 +110,16 @@ class AdminFormfieldForDBFieldWithRequestTests(DjangoTestCase):
response = self.client.get("/widget_admin/admin_widgets/cartire/add/")
self.assert_("BMW M3" not in response.content)
self.assert_("Volkswagon Passat" in response.content)
+
+class AdminForeignKeyWidgetChangeList(DjangoTestCase):
+ fixtures = ["admin-widgets-users.xml"]
+
+ def setUp(self):
+ self.client.login(username="super", password="secret")
+
+ def tearDown(self):
+ self.client.logout()
+
+ def test_changelist_foreignkey(self):
+ response = self.client.get('/widget_admin/admin_widgets/car/')
+ self.failUnless('/widget_admin/auth/user/add/' in response.content)