summaryrefslogtreecommitdiff
path: root/tests/unit/test_cache.py
Commit message (Collapse)AuthorAgeFilesLines
* Add option to manually cache response objectsJordan Cook2021-04-191-0/+6
| | | | Updates #98
* Don't show warnings for 'include_get_headers' and 'ignored_parameters' ↵Jordan Cook2021-04-181-5/+5
| | | | | | | kwargs in BaseStorage Also don't name them as private members, since they can safely by changed after initialization (e.g., `session.cache.include_get_headers = True`)
* Handle errors due to invalid responses in `BaseCache.urls`Jordan Cook2021-04-101-0/+8
|
* Add remove_old_entries() back to BaseCache as an alias with a DeprecationWarningJordan Cook2021-04-101-1/+7
|
* Improvements to Sphinx documentation:Jordan Cook2021-04-031-7/+7
| | | | | | | | | | | | | | * Use sphinx-apidoc to auto-generate sources for backend modules * Still manually adding other modules for more control over formatting * Add a couple more contributors I missed * Include contributors on readthedocs * Add 'all' Makefile target and clean auto-generated docs * Remove unused build targets in Makefile * Update interpshinx links that have moved * Fix some interpshinx links * Fix some `:ref:` links using auto-generated labels (and some manually added labels where convenient) * Fix some docstring formatting * Fix remaining build warnings
* Split 'core' module into 'session' and 'patcher' modules; keep placeholder ↵Jordan Cook2021-04-021-13/+27
| | | | 'core' module for backwards-compatibility
* Improve backend initialization:Jordan Cook2021-04-021-5/+21
| | | | | | | * Also allow passing a backend class (in addition to backend name and instance) * Detect duplicate params: Backends have different keyword args equivalent to the `cache_name` positional arg, for example `db_name`. If one of these is passed as a keyword arg, it results in a `TypeError` due to duplicate args (See #94). * For backends without dependencies installed, use a placeholder class to delay and re-raise the original `ImportError` * Add type annotations
* Add 'verify' param to cache keyJordan Cook2021-04-011-1/+7
| | | | Closes #209
* Convert test_thread_safety and test_monkey_patch from TestCase classes to ↵Jordan Cook2021-03-311-0/+18
| | | | pytest-style tests
* Split tests into unit and integration tests and run separately in CI; update ↵Jordan Cook2021-03-311-0/+492
Contributing Guide with more notes on testing