summaryrefslogtreecommitdiff
path: root/tests/unit/test_session.py
Commit message (Collapse)AuthorAgeFilesLines
* Don't raise_for_status if status_code of response is in allowable_codesDavid Dv Schmidt2023-02-181-9/+34
|
* Raise an error for invalid expiration string values (except for headers ↵Jordan Cook2023-02-181-0/+15
| | | | containing httpdates)
* Add tests for pypy3.9Jordan Cook2022-12-301-3/+6
|
* Omit invalid responses and set response.cache_key in SQLiteCache.sorted()Jordan Cook2022-10-281-1/+1
|
* Handle errors due to invalid responses in deserialize(), so it applies to ↵Jordan Cook2022-10-281-2/+3
| | | | other methods besides just get_responses()
* Explicitly disable pickling CachedSession objectsJordan Cook2022-10-201-0/+6
|
* Add 'url' argument to BaseCache.contains() and delete() for similarity to ↵Jordan Cook2022-09-301-20/+19
| | | | has_url() and delete_url()
* Silence DeprecationWarnings during tests for deprecated methodsJordan Cook2022-09-301-1/+2
|
* Match whether ignored_parameters are present in a request (without matching ↵Jordan Cook2022-09-291-9/+24
| | | | content)
* Update only_if_cached to take precedence over refresh or other revalidation ↵Jordan Cook2022-07-301-0/+10
| | | | conditions
* Some additional logging and testsJordan Cook2022-06-161-0/+16
|
* Update tests and docsJordan Cook2022-06-111-15/+10
|
* Split up remove_expired_reponses() into remove() and reset_expiration() ↵Jordan Cook2022-06-111-127/+5
| | | | methods, with more granular arguments
* Implement Cache-Control: stale-while-revalidateJordan Cook2022-05-041-35/+97
|
* Add 'older_than' argument to remove_expired_responses()Jordan Cook2022-05-031-1/+34
|
* Add always_revalidate session optionJordan Cook2022-05-031-3/+23
|
* Remove row count from BaseCache.__str__Jordan Cook2022-04-221-6/+3
|
* For SQLite expires column, use time.time() instead of datetime.timestamp()Jordan Cook2022-04-221-5/+5
|
* Merge *PickleDict storage classes into parent classesJordan Cook2022-04-221-4/+6
|
* Add misc missing test coverageJordan Cook2022-04-201-1/+9
|
* Add support for Cache-Control: stale-if-errorJordan Cook2022-04-181-2/+19
|
* Move all cache policy-related modules to separate 'policy' subpackageJordan Cook2022-04-171-1/+1
|
* Add serializer name to cache key to avoid errors due to switching serializersJordan Cook2022-04-151-8/+7
|
* Add indexed datetime column to SQLite backend for faster evictionJordan Cook2022-04-101-8/+11
|
* Add default list of ignored_parameters for most common authentication ↵Jordan Cook2022-04-101-13/+36
| | | | params/headers
* Also skip cache read for requests excluded by allowable_methodsJordan Cook2022-04-091-6/+46
|
* Move logic for translating kwargs to headers into ↵Jordan Cook2022-04-091-8/+12
| | | | cache_actions.set_request_headers()
* Refactor refresh/revalidate behaviorJordan Cook2022-04-091-37/+55
| | | | | | | | | | | | | | | * Rename two (unreleased) options to be more consistent with browser behavior: * `revalidate()` -> `refresh()` * `refresh()` -> `force_refresh()` * Revert `RequestSettings` changes and use just kwargs instead for per-request settings * Add full type hints back to extra kwargs for `CachedSession.send()` * Fix a bug in which some kwargs specific to requests-cache could get passed to `requests.Session.send()` * Use 'must-revalidate' as a temporary header for a user-requested refresh * Refer to expiration value of 0 more accurately as 'expire immediately' rather than 'do not cache' * It may potentially be saved and used with revalidation, depending on other headers/settings * `DO_NOT_CACHE` now has a different value but same effect * Refer to constants in docs instead of 0, -1, etc. * Log more details about post-read and pre-cache checks
* Add an intermediate wrapper class, OriginalResponse, to provide type hints ↵Jordan Cook2022-04-011-2/+2
| | | | for extra attributes set on requests.Response objects
* Remove some redundant, undocumented means of passing ↵Jordan Cook2022-04-011-20/+0
| | | | CachedSession/BaseBackend arguments
* Fix 504 behavior with stale-if-error and only-if-cachedJordan Cook2022-04-011-2/+3
|
* Fix some regression bugs and broken testsJordan Cook2022-03-291-35/+37
|
* Refactor request-level settings into separate RequestSettings classJordan Cook2022-03-291-20/+20
|
* Add support for Cache-Control: only-if-cached and corresponding options for ↵Jordan Cook2022-03-111-24/+68
| | | | request() and send()
* Add more unit test coverage for new revalidation behaviorJordan Cook2022-03-111-1/+78
|
* Reorganize tests in test_session moduleJordan Cook2022-03-111-248/+124
|
* Reword inaccurate usage of the term 'revalidate'Jordan Cook2022-03-111-2/+2
|
* Fix cache path expansionAndrew Stone2022-02-171-0/+6
|
* Use only integers for expire_after values in tests and docsJordan Cook2022-02-151-10/+10
|
* Fix disabling expiration for a single request with ↵Jordan Cook2022-02-151-2/+11
| | | | `CachedSession.request(..., expire_after=-1)`
* Fix support for `params`, `data`, and `json` as positional arguments to ↵Jordan Cook2022-02-131-0/+6
| | | | `CachedSession.request()`
* Format using a more typical line length of 100Jordan Cook2022-01-011-4/+16
|
* Add support for BaseCache keyword arguments passed along with a backend instanceJordan Cook2021-11-131-2/+17
|
* Move misc minor utils to a separate moduleJordan Cook2021-10-271-7/+2
|
* Fix duplicate cache read (contains + getitem)Jordan Cook2021-10-231-1/+1
|
* Reorganize & improve request normalization functions:Jordan Cook2021-09-201-18/+53
| | | | | | | | | | | | * Handle all normalization in `cache_keys` module, get rid of `normalize_dict()` function used in `CachedSession` * Reorganize `cache_keys` helper functions into the following: * `normalize_request()` * `normalize_url()` * `normalize_headers()` * `normalize_params()` * `normalize_body()` * `normalize_json_body()` * `redact_response()`
* Support expire_after param for CachedSession.send()Jordan Cook2021-09-181-0/+16
|
* Use only integers for expire_after values in seconds, since this is what ↵Jordan Cook2021-09-181-11/+11
| | | | Cache-Control: max-age requires
* Redact ingored_parameters from CachedResponse.urlJordan Cook2021-09-151-5/+23
|
* Alias/rename old_data_on_error to stale_if_error for consistency with ↵Jordan Cook2021-09-061-8/+14
| | | | Cache-Control: stale-if-error (backwards-compatibile)