(self)
| 3039 | ) |
| 3040 | |
| 3041 | def test_get_cache_key_with_query(self): |
| 3042 | request = self.factory.get(self.path, {"test": 1}) |
| 3043 | template = engines["django"].from_string("This is a test") |
| 3044 | response = TemplateResponse(HttpRequest(), template) |
| 3045 | # Expect None if no headers have been set yet. |
| 3046 | self.assertIsNone(get_cache_key(request)) |
| 3047 | # Set headers to an empty list. |
| 3048 | learn_cache_key(request, response) |
| 3049 | # The querystring is taken into account. |
| 3050 | self.assertEqual( |
| 3051 | get_cache_key(request), |
| 3052 | "views.decorators.cache.cache_page.settingsprefix.GET." |
| 3053 | "0f1c2d56633c943073c4569d9a9502fe.d41d8cd98f00b204e9800998ecf8427e", |
| 3054 | ) |
| 3055 | |
| 3056 | |
| 3057 | class TestMakeTemplateFragmentKey(SimpleTestCase): |
nothing calls this directly
no test coverage detected