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
Function
test_contains__key
(mock_session)
tests/unit/test_base_cache.py:44
Function
test_contains__multipart_request
(mock_session)
tests/unit/test_base_cache.py:59
Function
test_contains__request
(mock_session)
tests/unit/test_base_cache.py:51
Function
test_contains__url
(verify, mock_session)
tests/unit/test_base_cache.py:70
Method
test_cookies
(self)
tests/integration/base_cache_test.py:140
Function
test_copy
()
tests/unit/test_serializers.py:137
Method
test_corrupt_file
A corrupted file should be handled and raise a KeyError instead
tests/integration/test_mongodb.py:117
Method
test_count
(self)
tests/integration/test_filesystem.py:357
Method
test_count
count() should work the same as len(), but with the option to exclude expired responses
tests/integration/test_sqlite.py:369
Function
test_create_key__fips_hash_fallback
Test that if blake2b fails due to FIPS mode, it creates a valid key using a different hash function. Fallback on TypeError and ValueError - both a
tests/unit/test_cache_keys.py:77
Function
test_create_key__normalize_duplicate_params
()
tests/unit/test_cache_keys.py:60
Function
test_create_key__normalize_key_only_params
()
tests/unit/test_cache_keys.py:50
Function
test_create_key__normalize_url_params
All of the above variations should produce the same cache key
tests/unit/test_cache_keys.py:40
Method
test_create_table_error
An error other than 'ttl already enabled' should be reraised
tests/integration/test_dynamodb.py:64
Function
test_current
Run tests using the current virtualenv
noxfile.py:82
Method
test_custom_extension
(self)
tests/integration/test_filesystem.py:64
Function
test_custom_serializer
(tempfile_path)
tests/unit/test_serializers.py:100
Method
test_db_path
This is just provided as an alias, since both requests and redirects share the same db file
tests/integration/test_sqlite.py:362
Method
test_decode_gzip_response
Test that gzip-compressed responses read decompressed content with decode_content=True
tests/integration/base_cache_test.py:268
Method
test_decode_json_response
Test that JSON responses (with both dict and list root) are correctly returned from the cache, regardless of `decode_content` setting
tests/integration/base_cache_test.py:284
Method
test_decode_json_root_types
Test that JSON responses with an empty or primitive type root element are correctly returned from the cache, regardless of `decode_content` se
tests/integration/base_cache_test.py:324
Method
test_decode_json_variants
Test that other JSON media type variants are correctly decoded and returned from the cache
tests/integration/base_cache_test.py:304
Function
test_default_ignored_parameters
Common auth params and headers (for OAuth2, etc.) should be ignored by default
tests/unit/test_session.py:702
Method
test_del
Some more tests to ensure ``delitem`` deletes only the expected items
tests/integration/base_storage_test.py:77
Method
test_delete
(self)
tests/integration/test_filesystem.py:349
Function
test_delete__cache_not_installed
(mock_delete)
tests/unit/test_patcher.py:112
Function
test_delete__expired
(mock_normalize_url, mock_session)
tests/unit/test_base_cache.py:85
Method
test_delete__expired
(self)
tests/integration/base_cache_test.py:348
Function
test_delete__expired__per_request
(mock_session)
tests/unit/test_base_cache.py:118
Function
test_delete__expired_responses
(mock_delete)
tests/unit/test_patcher.py:104
Function
test_delete__invalid
(tempfile_path)
tests/unit/test_base_cache.py:145
Function
test_delete__keys
(mock_session)
tests/unit/test_base_cache.py:76
Function
test_delete__older_than
(mock_session)
tests/unit/test_base_cache.py:174
Function
test_delete__requests
(verify, mock_session)
tests/unit/test_base_cache.py:217
Method
test_delete__single_key
Vacuum should not be used after delete if there is only a single key
tests/integration/test_sqlite.py:379
Method
test_delete__skip_vacuum
Vacuum should not be used after delete if disabled
tests/integration/test_sqlite.py:388
Function
test_delete__urls
(mock_session)
tests/unit/test_base_cache.py:205
Method
test_deleting_key_that_does_not_exist_does_not_delete_other_keys
If a key does not exist, deleting it should not delete other keys.
tests/integration/base_storage_test.py:119
Function
test_disabled
(cached_request, original_request, installed_session)
tests/unit/test_patcher.py:77
Function
test_do_not_cache
DO_NOT_CACHE should bypass the cache on both read and write
tests/unit/test_session.py:781
Method
test_do_not_store_files_too_big
If a file is too big, it should not be cached at all.
tests/integration/test_filesystem.py:169
Method
test_do_not_store_files_too_big
If a file is too big, it should not be cached at all.
tests/integration/test_filesystem.py:550
Method
test_drop_oldest_files
Check that the files are added up to the size. After adding, the first ones are dropped.
tests/integration/test_filesystem.py:530
Method
test_enable_ttl_error
An error other than 'table already exists' should be reraised
tests/integration/test_dynamodb.py:54
Function
test_enabled
(cached_request, original_request, tempfile_path)
tests/unit/test_patcher.py:87
Method
test_evict__already_deleted
Test behahior when a file is being evicted but has already been (manually) deleted on disk
tests/integration/test_filesystem.py:197
Method
test_evict_oldest_files
Check that the files are added up to the size. After adding, the least recently used files are removed.
tests/integration/test_filesystem.py:177
Function
test_expire_after_alias
CachedSession has an `expire_after` property for backwards-compatibility
tests/unit/test_session.py:775
Function
test_expire_immediately
EXPIRE_IMMEDIATELY should save a response only if it has a validator
tests/unit/test_session.py:798
Function
test_expired_request_error
Without stale_if_error (default), if there is an error while re-fetching an expired response, the request should be re-raised
tests/unit/test_session.py:494
Method
test_file_exists
(self)
tests/integration/test_mongodb.py:127
Method
test_filter__expired
Filtering by expired should use a more efficient SQL query
tests/integration/test_sqlite.py:421
Function
test_filter_fn
(mock_normalize_url, mock_session)
tests/unit/test_session.py:725
Function
test_filter_fn__retroactive
filter_fn should also apply to previously cached responses
tests/unit/test_session.py:740
Method
test_filter_request_headers
(self, method)
tests/integration/base_cache_test.py:369
Method
test_filter_request_post_data
(self, post_type)
tests/integration/base_cache_test.py:392
Method
test_filter_request_query_parameters
(self, method)
tests/integration/base_cache_test.py:379
Function
test_format_file_size
(n_bytes, expected_size)
tests/unit/models/test_response.py:172
Function
test_from_request
(mock_session)
tests/unit/models/test_request.py:7
Function
test_from_response
(mock_session)
tests/unit/models/test_raw_response.py:7
Function
test_get_expiration_datetime__empty_string
An empty Expires header should raise ValueError, not IndexError
tests/unit/policy/test_expiration.py:57
Function
test_get_expiration_datetime__httpdate
()
tests/unit/policy/test_expiration.py:50
Function
test_get_expiration_datetime__no_expiration
(mock_datetime)
tests/unit/policy/test_expiration.py:19
Function
test_get_expiration_datetime__relative
(expire_after, expected_expiration_delta)
tests/unit/policy/test_expiration.py:37
Function
test_get_expiration_datetime__tzinfo
()
tests/unit/policy/test_expiration.py:44
Method
test_get_lru
(self)
tests/integration/test_filesystem.py:383
Method
test_get_set
(self)
tests/integration/test_filesystem.py:337
Method
test_get_size_on_disk
Compute the block size.
tests/integration/test_filesystem.py:271
Function
test_get_url_expiration
(url, expected_expire_after, mock_session)
tests/unit/policy/test_expiration.py:82
Function
test_get_url_expiration__evaluation_order
If there are multiple matches, the first match should be used in the order defined
tests/unit/policy/test_expiration.py:102
Function
test_history
(mock_session)
tests/unit/models/test_response.py:48
Function
test_hooks
(mock_session)
tests/unit/test_session.py:759
Function
test_https
(mock_session)
tests/unit/test_session.py:216
Function
test_ignored_headers
Ensure that currently unimplemented Cache-Control headers do not affect behavior
tests/unit/policy/test_actions.py:649
Function
test_ignores_nested
()
tests/unit/test_normalize.py:5
Function
test_ignores_nested_specialcase
()
tests/unit/test_normalize.py:17
Function
test_include_get_headers
include_get_headers is aliased to match_headers for backwards-compatibility
tests/unit/test_session.py:473
Function
test_inheritance_after_monkey_patch
(installed_session)
tests/unit/test_patcher.py:48
Function
test_init
Test precedence with various combinations or per-request, per-session, per-URL, and Cache-Control expiration
tests/unit/policy/test_actions.py:34
Method
test_init__invalid_block_bytes
This block size is invalid.
tests/integration/test_filesystem.py:118
Method
test_init__invalid_max_file_size
Cannot have file size greater than maximum cache size.
tests/integration/test_filesystem.py:127
Method
test_init__max_file_bytes_defaults_to_max_size
The argument is initialized properly.
tests/integration/test_filesystem.py:136
Method
test_init__shared_lock
Test passing the lock parameter.
tests/integration/test_filesystem.py:141
Function
test_init_backend_instance
()
tests/unit/test_session.py:63
Function
test_init_cache_path_expansion
()
tests/unit/test_session.py:74
Function
test_init_from_headers
Test with Cache-Control request headers
tests/unit/policy/test_actions.py:65
Function
test_init_from_headers__no_store
Test with Cache-Control request headers
tests/unit/policy/test_actions.py:78
Function
test_init_from_settings
Test with per-session, per-request, and per-URL expiration
tests/unit/policy/test_actions.py:106
Function
test_init_from_settings_and_headers
Test behavior with both cache settings and request headers.
tests/unit/policy/test_actions.py:137
Function
test_init_missing_backend_dependency
Test that the correct error is thrown when a user does not have a dependency installed
tests/unit/test_session.py:80
Function
test_init_unregistered_backend
()
tests/unit/test_session.py:69
Function
test_install_uninstall
()
tests/unit/test_patcher.py:12
Function
test_invalid_expiration
(mock_session)
tests/unit/test_session.py:853
Function
test_is_expired
(expires, is_expired, mock_session)
tests/unit/models/test_response.py:63
Function
test_is_expired__timezone_naive
(mock_session)
tests/unit/models/test_response.py:69
Function
test_is_installed
()
tests/unit/test_patcher.py:95
Function
test_is_usable__max_stale
For a response that expired 10 seconds ago, it may be either accepted or rejected based on max-stale
tests/unit/policy/test_actions.py:493
Function
test_is_usable__min_fresh
For a response that expires in 10 seconds, it may be either accepted or rejected based on min-fresh
tests/unit/policy/test_actions.py:507
Function
test_is_usable__stale_if_error
For a response that expired 10 seconds ago, if an error occurred while refreshing, it may be either accepted or rejected based on stale-if-error
tests/unit/policy/test_actions.py:528
Function
test_is_usable__stale_while_revalidate
For a response that expired 10 seconds ago, if an error occurred while refreshing, it may be either accepted or rejected based on stale-while-reva
tests/unit/policy/test_actions.py:548
← previous
next →
501–600 of 788, ranked by callers