paperdoorknob.fetch(f"http://localhost:{self._port()}", s, TIMEOUT)
self.assertEqual(self._request_counter, 1)
+ def testFetchPersistentCaching(self) -> None:
+ with requests_cache.CachedSession() as s:
+ paperdoorknob.fetch(f"http://localhost:{self._port()}", s, TIMEOUT)
+ self.assertEqual(self._request_counter, 1)
+ with requests_cache.CachedSession() as s:
+ paperdoorknob.fetch(f"http://localhost:{self._port()}", s, TIMEOUT)
+ self.assertEqual(self._request_counter, 1)
+
def testFetchErrors(self) -> None:
with requests.session() as s:
with self.assertRaises(requests.HTTPError):