diff options
| author | Luke Plant <L.Plant.98@cantab.net> | 2009-09-28 21:54:54 +0000 |
|---|---|---|
| committer | Luke Plant <L.Plant.98@cantab.net> | 2009-09-28 21:54:54 +0000 |
| commit | 6e3a72585a727d46ea03871f14a9a2f0f15fbf93 (patch) | |
| tree | aa6c19928b34ea2513527d9ff374120ede19841d /tests | |
| parent | a97648a7e03fb95b09e888e5d59d82d57fb289b7 (diff) | |
Added 'key_prefix' keyword argument to cache_page()
This was available before r11586, but undocumented. It has now been
re-added with documentation and explicit support, as it seems like a useful
feature and people were using it before.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11595 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/decorators/tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/regressiontests/decorators/tests.py b/tests/regressiontests/decorators/tests.py index 64d2d7df73..b81a5d665a 100644 --- a/tests/regressiontests/decorators/tests.py +++ b/tests/regressiontests/decorators/tests.py @@ -98,6 +98,8 @@ class DecoratorsTest(TestCase): return "response" my_view_cached = cache_page(123)(my_view) self.assertEqual(my_view_cached(HttpRequest()), "response") + my_view_cached2 = cache_page(123, key_prefix="test")(my_view) + self.assertEqual(my_view_cached2(HttpRequest()), "response") def test_cache_page_old_style(self): """ @@ -107,6 +109,8 @@ class DecoratorsTest(TestCase): return "response" my_view_cached = cache_page(my_view, 123) 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") class MethodDecoratorAdapterTests(TestCase): def test_auto_adapt_to_methods(self): |
