get_cache_key keys differ by fully-qualified URL instead of path
(self)
| 2243 | ) |
| 2244 | |
| 2245 | def test_cache_key_varies_by_url(self): |
| 2246 | """ |
| 2247 | get_cache_key keys differ by fully-qualified URL instead of path |
| 2248 | """ |
| 2249 | request1 = self.factory.get(self.path, headers={"host": "sub-1.example.com"}) |
| 2250 | learn_cache_key(request1, HttpResponse()) |
| 2251 | request2 = self.factory.get(self.path, headers={"host": "sub-2.example.com"}) |
| 2252 | learn_cache_key(request2, HttpResponse()) |
| 2253 | self.assertNotEqual(get_cache_key(request1), get_cache_key(request2)) |
| 2254 | |
| 2255 | def test_learn_cache_key(self): |
| 2256 | request = self.factory.head(self.path) |
nothing calls this directly
no test coverage detected