edx_django_utils.cache.tests package#
Submodules#
edx_django_utils.cache.tests.test_middleware module#
Tests for the RequestCacheMiddleware.
- class edx_django_utils.cache.tests.test_middleware.TestRequestCacheMiddleware(methodName='runTest')#
Bases:
TestCase- setUp()#
Hook method for setting up the test fixture before exercising it.
- test_process_request()#
- test_process_response()#
- class edx_django_utils.cache.tests.test_middleware.TestTieredCacheMiddleware(methodName='runTest')#
Bases:
TestCase- setUp()#
Hook method for setting up the test fixture before exercising it.
- test_process_request()#
- test_process_request_force_cache_miss()#
- test_process_request_force_cache_miss_non_staff()#
edx_django_utils.cache.tests.test_utils module#
Tests for the request cache.
- class edx_django_utils.cache.tests.test_utils.CacheResponseTests(methodName='runTest')#
Bases:
TestCase- test_cached_response_equals()#
- test_cached_response_misuse()#
- test_cached_response_not_equals()#
- test_is_hit()#
- test_is_miss()#
- class edx_django_utils.cache.tests.test_utils.TestCacheUtils(methodName='runTest')#
Bases:
TestCaseClass to test cache utils.
- test_get_cache_key_1___4e9c56b8837e97dd5a28b72ecc1d3754___True_(test_key, result)#
tests get_cache_key utility.
- test_get_cache_key_2___4e9c56b8837e97dd5a28b72ecc1d3754___True_(test_key, result)#
tests get_cache_key utility.
- test_get_cache_key_3___4e9c56b8837e97dd5a28b72ecc1d3754___True_(test_key, result)#
tests get_cache_key utility.
- test_get_cache_key_4___1808fa5ac4dfa1b1ad96a0d64790b33a___False_(test_key, result)#
tests get_cache_key utility.
- test_get_cache_key_5___b796089a93add87a3789331849386a5b___False_(test_key, result)#
tests get_cache_key utility.
- class edx_django_utils.cache.tests.test_utils.TestRequestCache(methodName='runTest')#
Bases:
TestCase- setUp()#
Hook method for setting up the test fixture before exercising it.
- test_cache_data()#
- test_clear()#
- test_clear_all_namespaces()#
- test_clear_all_namespaces_other_thread()#
Clearing all namespaces for a different thread should not clear this request cache.
- test_create_request_cache_with_default_namespace()#
- test_delete()#
- test_delete_missing_key()#
- test_get_cached_response_hit()#
- test_get_cached_response_hit_with_cached_none()#
- test_get_cached_response_miss()#
- test_get_cached_response_with_default()#
- test_get_cached_response_with_default_after_set()#
- class edx_django_utils.cache.tests.test_utils.TestTieredCache(methodName='runTest')#
Bases:
TestCase- setUp()#
Hook method for setting up the test fixture before exercising it.
- test_dangerous_clear_all_tiers_and_namespaces(mock_cache_clear)#
- test_delete(mock_cache_delete)#
- test_get_cached_response_all_tier_miss()#
- test_get_cached_response_django_cache_hit(mock_cache_get)#
- test_get_cached_response_force_cache_miss(mock_cache_get)#
- test_get_cached_response_request_cache_hit()#
- test_set_all_tiers(mock_cache_set)#