TestCacheDecoratorMemory¶
-
class
tests.test_cache.
TestCacheDecoratorMemory
(methodName='runTest')[source]¶ Test that the decorator
privex.helpers.decorators.r_cache()
caches correctly, with adapterprivex.helpers.cache.MemoryCache.MemoryCache
and also verifies dynamic cache key generation works as expected.-
__init__
(methodName='runTest') Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
-
Methods¶
Methods
Hook method for setting up class fixture before running tests in the class. |
|
|
Remove any Redis keys used during test, to avoid failure on re-run |
Decorate random string function - use a lambda callable to determine a cache key |
|
Decorate random string function with r_cache - test that two calls return the same string |
|
Decorate random string function with r_cache and use format_args for dynamic cache string testing |