diff options
| author | Joseph Kocherhans <joseph@jkocherhans.com> | 2009-03-31 20:39:54 +0000 |
|---|---|---|
| committer | Joseph Kocherhans <joseph@jkocherhans.com> | 2009-03-31 20:39:54 +0000 |
| commit | 00087ef006ecbebf34c67d7d15c27a61024ce0da (patch) | |
| tree | 157c07c5535a21fd98ef2848639ec9ddb3ef25c4 /tests/regressiontests/admin_views/tests.py | |
| parent | 1e0acd537b087978162750ad908e564cecf3301c (diff) | |
[1.0.X] Fixed #9863. A ForeignKey with editable=False to the parent in an inline no longer raises an exception. Thanks to keithb for the test case and Alex Gaynor for the patch. Backport of r10239 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10287 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/admin_views/tests.py')
| -rw-r--r-- | tests/regressiontests/admin_views/tests.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/regressiontests/admin_views/tests.py b/tests/regressiontests/admin_views/tests.py index 74cfcd3985..776bb024e1 100644 --- a/tests/regressiontests/admin_views/tests.py +++ b/tests/regressiontests/admin_views/tests.py @@ -819,3 +819,20 @@ class AdminInheritedInlinesTest(TestCase): self.failUnlessEqual(FooAccount.objects.all()[0].username, "%s-1" % foo_user) self.failUnlessEqual(BarAccount.objects.all()[0].username, "%s-1" % bar_user) self.failUnlessEqual(Persona.objects.all()[0].accounts.count(), 2) + +class TestInlineNotEditable(TestCase): + fixtures = ['admin-views-users.xml'] + + def setUp(self): + result = self.client.login(username='super', password='secret') + self.failUnlessEqual(result, True) + + def tearDown(self): + self.client.logout() + + def test(self): + """ + InlineModelAdmin broken? + """ + response = self.client.get('/test_admin/admin/admin_views/parent/add/') + self.failUnlessEqual(response.status_code, 200) |
