From 9d6eeeec39f834ad480778ba7aa4ece01c6f7aff Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Tue, 21 Sep 2010 19:32:22 +0000 Subject: Fixed #12019 - backwards compatibility issues with cache_page decorator. Thanks to rokclimb15 for the report, and j4mie/rokclimb15 for the patches. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13864 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/decorators/tests.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') 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. -- cgit v1.3