Used for computing the requests that we need to automatically align the service state with the test fixtures state.
Public Member Functions | |
__init__ (self, *mocked_time, testpoint, testpoint_control, caches.InvalidationState invalidation_state, typing.Optional[caches.CacheControl] cache_control) | |
updating_state (self, typing.Dict[str, typing.Any] body) | |
Whenever tests_control handler is invoked (by the client itself during prepare or manually by the user), we need to synchronize _state with the (supposed) service state. | |
typing.Dict[str, typing.Any] | get_pending_update (self) |
Compose the body of the tests_control request required to completely synchronize the service state with the state of test fixtures. | |
typing.ContextManager[typing.Dict] | cache_control_update (self) |
Protected Member Functions | |
None | _update_state (self, typing.Dict[str, typing.Any] body) |
_apply_new_state (self) | |
Apply new state to related components. | |
typing.Optional[str] | _get_desired_now (self) |
Static Protected Member Functions | |
None | _apply_cache_control_actions (typing.Dict invalidate_caches, typing.List[typing.Tuple[str, caches.CacheControlAction]] actions) |
Protected Attributes | |
_state | |
_mocked_time | |
_testpoint | |
_testpoint_control | |
_invalidation_state | |
_cache_control | |
pytest_userver.client._StateManager.__init__ | ( | self, | |
* | mocked_time, | ||
testpoint, | |||
testpoint_control, | |||
caches.InvalidationState | invalidation_state, | ||
typing.Optional[caches.CacheControl] | cache_control ) |
|
staticprotected |
|
protected |
|
protected |
|
protected |
typing.ContextManager[typing.Dict] pytest_userver.client._StateManager.cache_control_update | ( | self | ) |
typing.Dict[str, typing.Any] pytest_userver.client._StateManager.get_pending_update | ( | self | ) |
pytest_userver.client._StateManager.updating_state | ( | self, | |
typing.Dict[str, typing.Any] | body ) |
|
protected |
|
protected |
|
protected |
|
protected |