latest.ipv8.test.test_requestcache
Module Contents
Classes
A cache that stores a future. |
|
A cache that stores a future and registers it. |
|
Create a cache that has near-infinite timeout delay. |
|
A cache with a name. |
|
Tests related to the request cache. |
Attributes
- latest.ipv8.test.test_requestcache.CACHE_TIMEOUT = 0.01
- class latest.ipv8.test.test_requestcache.MockCache(request_cache: latest.ipv8.requestcache.RequestCache)
Bases:
latest.ipv8.requestcache.RandomNumberCache
A cache that stores a future.
- class latest.ipv8.test.test_requestcache.MockRegisteredCache(request_cache: latest.ipv8.requestcache.RequestCache)
Bases:
latest.ipv8.requestcache.RandomNumberCache
A cache that stores a future and registers it.
- class latest.ipv8.test.test_requestcache.MockInfiniteCache(request_cache: latest.ipv8.requestcache.RequestCache)
Bases:
latest.ipv8.requestcache.RandomNumberCache
Create a cache that has near-infinite timeout delay.
- class latest.ipv8.test.test_requestcache.MockNamedCache(request_cache: latest.ipv8.requestcache.RequestCache)
Bases:
latest.ipv8.requestcache.RandomNumberCacheWithName
A cache with a name.
- name = 'my-cache-name'
- class latest.ipv8.test.test_requestcache.TestRequestCache(methodName: str = 'runTest')
Bases:
latest.ipv8.test.base.TestBase
Tests 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.