MCPcopy Create free account

hub / github.com/requests-cache/requests-cache / functions

Functions788 in github.com/requests-cache/requests-cache

Methodtest_iter_empty_table
(self)
tests/integration/test_dynamodb.py:97
Methodtest_iterable_methods
Test iterable dict methods with multiple cache instances: ``iter, keys, values, items``
tests/integration/base_storage_test.py:51
Functiontest_iterator
(mock_session)
tests/unit/models/test_response.py:77
Functiontest_json
(mock_session)
tests/unit/test_session.py:209
Functiontest_json_aliases
()
tests/unit/test_serializers.py:29
Functiontest_json_explicit_lib
()
tests/unit/test_serializers.py:37
Functiontest_key_fn
(mock_session)
tests/unit/test_session.py:748
Methodtest_keyerrors
Accessing or deleting a deleted item should raise a KeyError
tests/integration/base_storage_test.py:108
Methodtest_large_file_evicts_all
If we add a big file, we should delete everything.
tests/integration/test_filesystem.py:230
Functiontest_match_headers
With match_headers, requests with different headers should have different cache keys
tests/unit/test_session.py:334
Functiontest_match_headers__list
match_headers can optionally be a list of specific headers to include
tests/unit/test_session.py:357
Functiontest_match_headers__normalize
With match_headers, the same headers (in any order) should have the same cache key
tests/unit/test_session.py:348
Functiontest_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
Functiontest_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
Functiontest_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
Functiontest_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
Functiontest_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
Functiontest_mock_session
Test that the mock_session fixture is working as expected
tests/compat/test_responses_load_cache.py:51
Functiontest_mock_session
Test that the mock_session fixture is working as expected
tests/compat/test_requests_mock_load_cache.py:45
Functiontest_mock_session
Test that the mock_session fixture is working as expected
tests/compat/test_requests_mock_combine_cache.py:29
Methodtest_multipart_upload
(self)
tests/integration/base_cache_test.py:342
Methodtest_multiple_cache_instances
Multiple cache instances should see the same files.
tests/integration/test_filesystem.py:150
Methodtest_no_create_table
(self, mock_resource)
tests/integration/test_dynamodb.py:50
Methodtest_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
Functiontest_normalize_headers__multiple_header_values_as_bytes
()
tests/unit/test_cache_keys.py:240
Functiontest_normalize_headers__multiple_header_values_as_string
()
tests/unit/test_cache_keys.py:252
Functiontest_normalize_headers__single_header_value_as_bytes
()
tests/unit/test_cache_keys.py:234
Functiontest_normalize_headers__single_header_value_as_string
()
tests/unit/test_cache_keys.py:246
Functiontest_normalize_params
Test normalization with different combinations of data fields
tests/unit/test_session.py:265
Functiontest_normalize_params__custom_dicts
Test normalization with different dict-like classes
tests/unit/test_session.py:279
Functiontest_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
Functiontest_normalize_params__serialized_body
Test normalization for serialized request body content
tests/unit/test_session.py:290
Functiontest_normalize_params__url
Test URL variations that should all result in the same key
tests/unit/test_session.py:318
Functiontest_normalize_params__urlencoded_body
(mock_session)
tests/unit/test_session.py:302
Functiontest_normalize_request__binary_body
(content_type)
tests/unit/test_cache_keys.py:175
Functiontest_normalize_request__file_like_body
()
tests/unit/test_cache_keys.py:198
Functiontest_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
Functiontest_normalize_request__json_body
(data, content_type)
tests/unit/test_cache_keys.py:129
Functiontest_normalize_request__json_body_empty
()
tests/unit/test_cache_keys.py:161
Functiontest_normalize_request__json_body_invalid
()
tests/unit/test_cache_keys.py:151
Functiontest_normalize_request__json_body_list_filtered
()
tests/unit/test_cache_keys.py:140
Functiontest_normalize_request__oversized_body
()
tests/unit/test_cache_keys.py:185
Functiontest_old_data_on_error
stale_if_error is aliased to old_data_on_error for backwards-compatibility
tests/unit/test_session.py:587
Functiontest_optional_dependencies
()
tests/unit/test_serializers.py:49
Functiontest_original_response
Test both instantiating directly and wrapping a `requests.Response`
tests/unit/models/test_response.py:36
Methodtest_pagination_all_pages_returned
(self, use_values)
tests/integration/test_dynamodb.py:103
Methodtest_pagination_exclusive_start_key_threaded
(self)
tests/integration/test_dynamodb.py:119
Functiontest_params_positional_arg
(mock_session)
tests/unit/test_session.py:203
Methodtest_paths
(self, serializer_name)
tests/integration/test_filesystem.py:508
Methodtest_picklable_dict
(self)
tests/integration/base_storage_test.py:128
Functiontest_pickle__disabled
()
tests/unit/test_session.py:112
Functiontest_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
Methodtest_pragma
Test settings that make additional PRAGMA statements
tests/integration/test_sqlite.py:133
Functiontest_raw_data
POST and PUT requests with different data (raw) should be cached under different keys
tests/unit/test_session.py:254
Functiontest_read
()
tests/unit/models/test_raw_response.py:23
Functiontest_read__always_decode
read() with decode_content=False is not supported
tests/unit/models/test_raw_response.py:31
Functiontest_read_only
In read-only mode, cached responses should be returned, but no new responses should be cached
tests/unit/test_session.py:1002
Functiontest_read_only__expired_response
In read-only mode, expired responses trigger re-fetch but don't update cache
tests/unit/test_session.py:1024
Functiontest_read_only__force_refresh
force_refresh skips cache read, but read_only still prevents write
tests/unit/test_session.py:1013
Functiontest_recreate_keys
(mock_session)
tests/unit/test_base_cache.py:229
Functiontest_recreate_keys__empty_response_body
(mock_session)
tests/unit/test_base_cache.py:267
Functiontest_recreate_keys__same_key_fn
(mock_session)
tests/unit/test_base_cache.py:252
Functiontest_redact_response__escaped_params
Test that redact_response() handles urlescaped request parameters
tests/unit/test_cache_keys.py:94
Methodtest_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
Methodtest_redirect_responses
Test redirect caching (in main `responses` cache) with all types of redirect endpoints
tests/integration/base_cache_test.py:129
Functiontest_remove_expired_responses
(mock_session)
tests/unit/test_base_cache.py:360
Functiontest_remove_ignored_headers__empty
()
tests/unit/test_cache_keys.py:258
Functiontest_repr
Test session and cache string representations
tests/unit/test_session.py:102
Functiontest_repr
Just ensure that a subset of relevant attrs get included in the response repr
tests/unit/models/test_response.py:153
Functiontest_repr
Test that regular __repr__ excludes default values
tests/unit/models/test_base.py:29
Functiontest_request_expire_after__disable_expiration
A per-session expiration is set, but then disabled for a single request
tests/unit/test_session.py:951
Functiontest_request_expire_after__enable_expiration
No per-session expiration is set, but then overridden for a single request
tests/unit/test_session.py:938
Functiontest_request_expire_after__prepared_request
Pre-request expiration should also work for PreparedRequests with CachedSession.send()
tests/unit/test_session.py:961
Functiontest_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
Functiontest_request_force_refresh__prepared_request
The force_refresh option should also work for PreparedRequests with CachedSession.send()
tests/unit/test_session.py:1180
Functiontest_request_only_if_cached__cached
only_if_cached has no effect if the response is already cached
tests/unit/test_session.py:975
Functiontest_request_only_if_cached__expired
By default, only_if_cached will not return an expired response
tests/unit/test_session.py:992
Functiontest_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
Functiontest_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
Functiontest_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
Functiontest_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
Functiontest_request_refresh
The refresh option should send a conditional request, if possible
tests/unit/test_session.py:1113
Functiontest_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
Functiontest_request_refresh__prepared_request
The refresh option should also work for PreparedRequests with CachedSession.send()
tests/unit/test_session.py:1148
Functiontest_requests_cache_mock
Within this test function, requests will be mocked and not cached
tests/compat/test_requests_mock_disable_cache.py:15
Functiontest_reset
()
tests/unit/models/test_raw_response.py:43
Functiontest_reset_expiration__extend_expiration
(mock_session)
tests/unit/test_base_cache.py:288
Functiontest_reset_expiration__extend_expiration
(mock_session)
tests/unit/models/test_response.py:107
Functiontest_reset_expiration__shorten_expiration
(mock_session)
tests/unit/test_base_cache.py:300
Functiontest_reset_expiration__shorten_expiration
(mock_session)
tests/unit/models/test_response.py:122
Functiontest_response_defaults
Both cached and new responses should always have the following attributes
tests/unit/test_session.py:117
Functiontest_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
Methodtest_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
Methodtest_response_no_duplicate_read
(self)
tests/integration/test_memory.py:27
Methodtest_reused_keys_can_be_removed
Keys can be reused and can be removed.
tests/integration/base_storage_test.py:200
Functiontest_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
Functiontest_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
Functiontest_rich_mixin
Test that RichMixin.__rich_repr__ informs rich about all public attributes, current values, and defaults
tests/unit/models/test_base.py:16
Methodtest_same_settings
This test from base class doesn't apply here
tests/integration/test_memory.py:19
Methodtest_same_settings
(self)
tests/integration/base_storage_test.py:165
← previousnext →601–700 of 788, ranked by callers