This repository has been archived by the owner on May 5, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`test_update_cached_response_with_valid_headers` is wrong even though it currently passes. As far as I can tell it attempts to emulate the following scenario: * There is already a cached response for `http://url.com/` * `CacheController.update_cached_response` is called with a request and a validation response for the same url The problem is: it incorrectly sets the second url to `http://foo.com`. This causes `CacheController.cache.get(cache_url)` to return None. The test currently passes because `CacheController.serializer.loads` is mocked and `CacheController.update_cached_response` currently passes `CacheController.cache.get(cache_url)` to `CacheController.serializer.loads` unconditionally: ```py self.serializer.loads(request, self.cache.get(cache_url)) ``` This test failed when I tried to refactor the code
- Loading branch information