Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/requests-cache/requests-cache
/ functions
Functions
788 in github.com/requests-cache/requests-cache
⨍
Functions
788
◇
Types & classes
66
↳
Endpoints
31
Method
test_iter_empty_table
(self)
tests/integration/test_dynamodb.py:97
Method
test_iterable_methods
Test iterable dict methods with multiple cache instances: ``iter, keys, values, items``
tests/integration/base_storage_test.py:51
Function
test_iterator
(mock_session)
tests/unit/models/test_response.py:77
Function
test_json
(mock_session)
tests/unit/test_session.py:209
Function
test_json_aliases
()
tests/unit/test_serializers.py:29
Function
test_json_explicit_lib
()
tests/unit/test_serializers.py:37
Function
test_key_fn
(mock_session)
tests/unit/test_session.py:748
Method
test_keyerrors
Accessing or deleting a deleted item should raise a KeyError
tests/integration/base_storage_test.py:108
Method
test_large_file_evicts_all
If we add a big file, we should delete everything.
tests/integration/test_filesystem.py:230
Function
test_match_headers
With match_headers, requests with different headers should have different cache keys
tests/unit/test_session.py:334
Function
test_match_headers__list
match_headers can optionally be a list of specific headers to include
tests/unit/test_session.py:357
Function
test_match_headers__normalize
With match_headers, the same headers (in any order) should have the same cache key
tests/unit/test_session.py:348
Function
test_match_headers__vary
Vary should be used to validate headers, if available. It should also override `match_headers` for the secondary cache key, if both are provided.
tests/unit/test_session.py:370
Function
test_match_headers__vary_alternating
Alternating between two Accept values should not cause endless cache misses. After the first round of requests, each variant should be cached unde
tests/unit/test_session.py:388
Function
test_match_headers__vary_alternating_with_redirects
Secondary Vary lookup should work correctly through redirect chains. Each Accept-Language variant should be cached under its own Vary-qualified ke
tests/unit/test_session.py:457
Function
test_match_headers__vary_authorization
When Vary headers overlaps with ignored_parameters and the header is present on the request, it's always a cache miss (prevents cross-user cache l
tests/unit/test_session.py:409
Function
test_match_headers__vary_with_redirects
With Vary + redirects, Vary should match against the last request in the redirect chain. * 1st response has `Vary: Accept` (shouldn't be matched)
tests/unit/test_session.py:442
Function
test_mock_session
Test that the mock_session fixture is working as expected
tests/compat/test_responses_load_cache.py:51
Function
test_mock_session
Test that the mock_session fixture is working as expected
tests/compat/test_requests_mock_load_cache.py:45
Function
test_mock_session
Test that the mock_session fixture is working as expected
tests/compat/test_requests_mock_combine_cache.py:29
Method
test_multipart_upload
(self)
tests/integration/base_cache_test.py:342
Method
test_multiple_cache_instances
Multiple cache instances should see the same files.
tests/integration/test_filesystem.py:150
Method
test_no_create_table
(self, mock_resource)
tests/integration/test_dynamodb.py:50
Method
test_non_dir_parent_exists
Expect a custom error message if a parent path already exists but isn't a directory
tests/integration/test_sqlite.py:75
Function
test_normalize_headers__multiple_header_values_as_bytes
()
tests/unit/test_cache_keys.py:240
Function
test_normalize_headers__multiple_header_values_as_string
()
tests/unit/test_cache_keys.py:252
Function
test_normalize_headers__single_header_value_as_bytes
()
tests/unit/test_cache_keys.py:234
Function
test_normalize_headers__single_header_value_as_string
()
tests/unit/test_cache_keys.py:246
Function
test_normalize_params
Test normalization with different combinations of data fields
tests/unit/test_session.py:265
Function
test_normalize_params__custom_dicts
Test normalization with different dict-like classes
tests/unit/test_session.py:279
Function
test_normalize_params__non_json_body
For serialized request body content that isn't in JSON format, no normalization is expected
tests/unit/test_session.py:311
Function
test_normalize_params__serialized_body
Test normalization for serialized request body content
tests/unit/test_session.py:290
Function
test_normalize_params__url
Test URL variations that should all result in the same key
tests/unit/test_session.py:318
Function
test_normalize_params__urlencoded_body
(mock_session)
tests/unit/test_session.py:302
Function
test_normalize_request__binary_body
(content_type)
tests/unit/test_cache_keys.py:175
Function
test_normalize_request__file_like_body
()
tests/unit/test_cache_keys.py:198
Function
test_normalize_request__file_like_reset_fails
Test a request body with a file-like class that doesn't support seek()
tests/unit/test_cache_keys.py:210
Function
test_normalize_request__json_body
(data, content_type)
tests/unit/test_cache_keys.py:129
Function
test_normalize_request__json_body_empty
()
tests/unit/test_cache_keys.py:161
Function
test_normalize_request__json_body_invalid
()
tests/unit/test_cache_keys.py:151
Function
test_normalize_request__json_body_list_filtered
()
tests/unit/test_cache_keys.py:140
Function
test_normalize_request__oversized_body
()
tests/unit/test_cache_keys.py:185
Function
test_old_data_on_error
stale_if_error is aliased to old_data_on_error for backwards-compatibility
tests/unit/test_session.py:587
Function
test_optional_dependencies
()
tests/unit/test_serializers.py:49
Function
test_original_response
Test both instantiating directly and wrapping a `requests.Response`
tests/unit/models/test_response.py:36
Method
test_pagination_all_pages_returned
(self, use_values)
tests/integration/test_dynamodb.py:103
Method
test_pagination_exclusive_start_key_threaded
(self)
tests/integration/test_dynamodb.py:119
Function
test_params_positional_arg
(mock_session)
tests/unit/test_session.py:203
Method
test_paths
(self, serializer_name)
tests/integration/test_filesystem.py:508
Method
test_picklable_dict
(self)
tests/integration/base_storage_test.py:128
Function
test_pickle__disabled
()
tests/unit/test_session.py:112
Function
test_plain_pickle
`requests.Response` modifies pickling behavior. If plain `pickle` is used as a serializer, serializing `CachedResponse` should still work as expec
tests/unit/test_serializers.py:114
Method
test_pragma
Test settings that make additional PRAGMA statements
tests/integration/test_sqlite.py:133
Function
test_raw_data
POST and PUT requests with different data (raw) should be cached under different keys
tests/unit/test_session.py:254
Function
test_read
()
tests/unit/models/test_raw_response.py:23
Function
test_read__always_decode
read() with decode_content=False is not supported
tests/unit/models/test_raw_response.py:31
Function
test_read_only
In read-only mode, cached responses should be returned, but no new responses should be cached
tests/unit/test_session.py:1002
Function
test_read_only__expired_response
In read-only mode, expired responses trigger re-fetch but don't update cache
tests/unit/test_session.py:1024
Function
test_read_only__force_refresh
force_refresh skips cache read, but read_only still prevents write
tests/unit/test_session.py:1013
Function
test_recreate_keys
(mock_session)
tests/unit/test_base_cache.py:229
Function
test_recreate_keys__empty_response_body
(mock_session)
tests/unit/test_base_cache.py:267
Function
test_recreate_keys__same_key_fn
(mock_session)
tests/unit/test_base_cache.py:252
Function
test_redact_response__escaped_params
Test that redact_response() handles urlescaped request parameters
tests/unit/test_cache_keys.py:94
Method
test_redirect_history
Test redirect caching (in separate `redirects` cache) with all types of redirect endpoints, using different numbers of consecutive redirects
tests/integration/base_cache_test.py:117
Method
test_redirect_responses
Test redirect caching (in main `responses` cache) with all types of redirect endpoints
tests/integration/base_cache_test.py:129
Function
test_remove_expired_responses
(mock_session)
tests/unit/test_base_cache.py:360
Function
test_remove_ignored_headers__empty
()
tests/unit/test_cache_keys.py:258
Function
test_repr
Test session and cache string representations
tests/unit/test_session.py:102
Function
test_repr
Just ensure that a subset of relevant attrs get included in the response repr
tests/unit/models/test_response.py:153
Function
test_repr
Test that regular __repr__ excludes default values
tests/unit/models/test_base.py:29
Function
test_request_expire_after__disable_expiration
A per-session expiration is set, but then disabled for a single request
tests/unit/test_session.py:951
Function
test_request_expire_after__enable_expiration
No per-session expiration is set, but then overridden for a single request
tests/unit/test_session.py:938
Function
test_request_expire_after__prepared_request
Pre-request expiration should also work for PreparedRequests with CachedSession.send()
tests/unit/test_session.py:961
Function
test_request_force_refresh
The force_refresh option should send and cache a new request. Any expire_after value provided should overwrite the previous value.
tests/unit/test_session.py:1167
Function
test_request_force_refresh__prepared_request
The force_refresh option should also work for PreparedRequests with CachedSession.send()
tests/unit/test_session.py:1180
Function
test_request_only_if_cached__cached
only_if_cached has no effect if the response is already cached
tests/unit/test_session.py:975
Function
test_request_only_if_cached__expired
By default, only_if_cached will not return an expired response
tests/unit/test_session.py:992
Function
test_request_only_if_cached__prepared_request
The only_if_cached option should also work for PreparedRequests with CachedSession.send()
tests/unit/test_session.py:1062
Function
test_request_only_if_cached__skips_revalidate
only_if_cached should skip other revalidation conditions if the response isn't expired. This includes taking precedence over refresh=True.
tests/unit/test_session.py:1052
Function
test_request_only_if_cached__stale_if_error__expired
only_if_cached *will* return an expired response if stale_if_error is also set
tests/unit/test_session.py:1039
Function
test_request_only_if_cached__uncached
only_if_cached should return a 504 response if it is not already cached
tests/unit/test_session.py:983
Function
test_request_refresh
The refresh option should send a conditional request, if possible
tests/unit/test_session.py:1113
Function
test_request_refresh__no_validator
The refresh option should result in a new (unconditional) request if the cached response has no validator
tests/unit/test_session.py:1131
Function
test_request_refresh__prepared_request
The refresh option should also work for PreparedRequests with CachedSession.send()
tests/unit/test_session.py:1148
Function
test_requests_cache_mock
Within this test function, requests will be mocked and not cached
tests/compat/test_requests_mock_disable_cache.py:15
Function
test_reset
()
tests/unit/models/test_raw_response.py:43
Function
test_reset_expiration__extend_expiration
(mock_session)
tests/unit/test_base_cache.py:288
Function
test_reset_expiration__extend_expiration
(mock_session)
tests/unit/models/test_response.py:107
Function
test_reset_expiration__shorten_expiration
(mock_session)
tests/unit/test_base_cache.py:300
Function
test_reset_expiration__shorten_expiration
(mock_session)
tests/unit/models/test_response.py:122
Function
test_response_defaults
Both cached and new responses should always have the following attributes
tests/unit/test_session.py:117
Function
test_response_history
When a request results in redirects: * An alias for the redirect should be added to 'redirects' table/collection * Both the original and targe
tests/unit/test_session.py:233
Method
test_response_no_duplicate_read
Ensure that response data is read only once per request, whether it's cached or not
tests/integration/base_cache_test.py:100
Method
test_response_no_duplicate_read
(self)
tests/integration/test_memory.py:27
Method
test_reused_keys_can_be_removed
Keys can be reused and can be removed.
tests/integration/base_storage_test.py:200
Function
test_revalidation__skip_update
After a revalidation request, the response should not be updated in the cache if expiration and headers are unchanged.
tests/unit/test_session.py:1071
Function
test_revalidation__update_cache
After a revalidation request, the response should be updated in the cache with new expiration and/or headers (if either changed).
tests/unit/test_session.py:1088
Function
test_rich_mixin
Test that RichMixin.__rich_repr__ informs rich about all public attributes, current values, and defaults
tests/unit/models/test_base.py:16
Method
test_same_settings
This test from base class doesn't apply here
tests/integration/test_memory.py:19
Method
test_same_settings
(self)
tests/integration/base_storage_test.py:165
← previous
next →
601–700 of 788, ranked by callers