3.0.ipv8.test.test_requestcache
Attributes
Classes
Module Contents
- 3.0.ipv8.test.test_requestcache.CACHE_TIMEOUT = 0.01
- class 3.0.ipv8.test.test_requestcache.MockCache(request_cache: 3.0.ipv8.requestcache.RequestCache)
Bases:
3.0.ipv8.requestcache.RandomNumberCacheA cache that stores a future.
- timed_out
- class 3.0.ipv8.test.test_requestcache.MockRegisteredCache(request_cache: 3.0.ipv8.requestcache.RequestCache)
Bases:
3.0.ipv8.requestcache.RandomNumberCacheA cache that stores a future and registers it.
- timed_out
- class 3.0.ipv8.test.test_requestcache.MockInfiniteCache(request_cache: 3.0.ipv8.requestcache.RequestCache)
Bases:
3.0.ipv8.requestcache.RandomNumberCacheCreate a cache that has near-infinite timeout delay.
- timed_out = False
- class 3.0.ipv8.test.test_requestcache.MockNamedCache(request_cache: 3.0.ipv8.requestcache.RequestCache)
Bases:
3.0.ipv8.requestcache.RandomNumberCacheWithNameA cache with a name.
- name = 'my-cache-name'
- class 3.0.ipv8.test.test_requestcache.MockNamedNumberCache(request_cache: RequestCache, prefix: str, number: int)
Bases:
3.0.ipv8.requestcache.NumberCacheA “normal” NumberCache that has a name.
- name = 'test'
- class 3.0.ipv8.test.test_requestcache.TestRequestCache(methodName: str = 'runTest')
Bases:
3.0.ipv8.test.base.TestBaseTests related to the request cache.
- async test_add_duplicate() None
Test if adding a cache twice returns None as the newly added cache.
- async test_timeout_future_default_value() None
Test if a registered future gets set to None on timeout.
- async test_timeout_future_custom_value() None
Test if a registered future gets set to a value on timeout.
- async test_timeout_future_exception() None
Test if a registered future raises an exception on timeout.
- async test_cancel_future_after_shutdown() None
Test if a registered future is cancelled when the RequestCache has shutdown.
- async test_passthrough_noargs() None
Test if passthrough without arguments immediately times a cache out.
- async test_passthrough_filter_one_match() None
Test if passthrough filters correctly with one filter, that matches.
- async test_passthrough_filter_one_mismatch() None
Test if passthrough filters correctly with one filter, that doesn’t match.
- async test_passthrough_filter_many_match() None
Test if passthrough filters correctly with many filters, that all match.
- async test_passthrough_filter_some_match() None
Test if passthrough filters correctly with many filters, for which some match.
- async test_passthrough_filter_no_match() None
Test if passthrough filters correctly with many filters, for which none match.