(self)
| 2229 | ) |
| 2230 | |
| 2231 | def test_get_cache_key_with_query(self): |
| 2232 | request = self.factory.get(self.path, {"test": 1}) |
| 2233 | response = HttpResponse() |
| 2234 | # Expect None if no headers have been set yet. |
| 2235 | self.assertIsNone(get_cache_key(request)) |
| 2236 | # Set headers to an empty list. |
| 2237 | learn_cache_key(request, response) |
| 2238 | # The querystring is taken into account. |
| 2239 | self.assertEqual( |
| 2240 | get_cache_key(request), |
| 2241 | "views.decorators.cache.cache_page.settingsprefix.GET." |
| 2242 | "beaf87a9a99ee81c673ea2d67ccbec2a.d41d8cd98f00b204e9800998ecf8427e", |
| 2243 | ) |
| 2244 | |
| 2245 | def test_cache_key_varies_by_url(self): |
| 2246 | """ |
nothing calls this directly
no test coverage detected