mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
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
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user