summaryrefslogtreecommitdiff
path: root/tests/regressiontests
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2010-09-21 19:33:53 +0000
committerLuke Plant <L.Plant.98@cantab.net>2010-09-21 19:33:53 +0000
commit804719ff23a8fc80b871900663b99085021d9b1b (patch)
tree977107d27807ea72ac45ab5e1f0eecf69901dcf2 /tests/regressiontests
parent80b9233e4a45f87b1b6da555026119af5c587d55 (diff)
[1.2.X] Fixed #12019 - backwards compatibility issues with cache_page decorator.
Thanks to rokclimb15 for the report, and j4mie/rokclimb15 for the patches. Backport of [13864] from trunk git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13865 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
-rw-r--r--tests/regressiontests/decorators/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/regressiontests/decorators/tests.py b/tests/regressiontests/decorators/tests.py
index 7855fef638..ea2e10e965 100644
--- a/tests/regressiontests/decorators/tests.py
+++ b/tests/regressiontests/decorators/tests.py
@@ -112,6 +112,10 @@ class DecoratorsTest(TestCase):
self.assertEqual(my_view_cached(HttpRequest()), "response")
my_view_cached2 = cache_page(my_view, 123, key_prefix="test")
self.assertEqual(my_view_cached2(HttpRequest()), "response")
+ my_view_cached3 = cache_page(my_view)
+ self.assertEqual(my_view_cached3(HttpRequest()), "response")
+ my_view_cached4 = cache_page()(my_view)
+ self.assertEqual(my_view_cached4(HttpRequest()), "response")
# For testing method_decorator, a decorator that assumes a single argument.