summaryrefslogtreecommitdiff
path: root/tests/regressiontests/admin_widgets/tests.py
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2009-04-08 20:25:56 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2009-04-08 20:25:56 +0000
commitf55f2b9d74bf59d1b3ace5df5f498998eb62cb28 (patch)
tree0d8c11839c7d8ee8ef463e080e0fbf91be68058e /tests/regressiontests/admin_widgets/tests.py
parent6eaf154a2e81d21d02f3597dd0e3dad01db8d07c (diff)
Fixed #10059: `ModelAdmin.formfield_for_dbfield` now handles custom `Field` subclasses. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10454 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/admin_widgets/tests.py')
-rw-r--r--tests/regressiontests/admin_widgets/tests.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/regressiontests/admin_widgets/tests.py b/tests/regressiontests/admin_widgets/tests.py
index c2b040368d..55088ca1fe 100644
--- a/tests/regressiontests/admin_widgets/tests.py
+++ b/tests/regressiontests/admin_widgets/tests.py
@@ -98,6 +98,8 @@ class AdminFormfieldForDBFieldTests(TestCase):
self.assertFormfield(models.Member, 'gender', widgets.AdminRadioSelect,
radio_fields={'gender':admin.VERTICAL})
+ def testInheritance(self):
+ self.assertFormfield(models.Album, 'backside_art', widgets.AdminFileWidget)
class AdminFormfieldForDBFieldWithRequestTests(DjangoTestCase):
fixtures = ["admin-widgets-users.xml"]
@@ -113,13 +115,13 @@ class AdminFormfieldForDBFieldWithRequestTests(DjangoTestCase):
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)