summaryrefslogtreecommitdiff
path: root/tests/regressiontests
diff options
context:
space:
mode:
authorBrian Rosner <brosner@gmail.com>2010-04-12 14:36:48 +0000
committerBrian Rosner <brosner@gmail.com>2010-04-12 14:36:48 +0000
commit2a752edd808921c1938fbd4ea3a07a76af9eb0f5 (patch)
treec44738a674f6e36d9b7583ec0eadd071566805a0 /tests/regressiontests
parent2cebe4395e9ed345bbbe346b91842b4c97ffcfc7 (diff)
Fixed #11957 -- exceptions in admin.py are no longer hidden after second request
Before you had to restart runserver for the correct exception message to show up again. Reverts fix in r9680 which has this side-affect. Thanks to jarrow, carljm and ramiro for their work on the patch and tickets. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12956 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
-rw-r--r--tests/regressiontests/bug8245/tests.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/regressiontests/bug8245/tests.py b/tests/regressiontests/bug8245/tests.py
index c1cc3b595c..b7c7bcdf7c 100644
--- a/tests/regressiontests/bug8245/tests.py
+++ b/tests/regressiontests/bug8245/tests.py
@@ -18,6 +18,13 @@ class Bug8245Test(TestCase):
else:
self.fail(
'autodiscover should have raised a "Bad admin module" error.')
- # Calling autodiscover again should bail out early and not raise an
- # AlreadyRegistered error.
- admin.autodiscover()
+
+ # Calling autodiscover again should raise the very same error it did
+ # the first time, not an AlreadyRegistered error.
+ try:
+ admin.autodiscover()
+ except Exception, e:
+ self.failUnlessEqual(str(e), "Bad admin module")
+ else:
+ self.fail(
+ 'autodiscover should have raised a "Bad admin module" error.')