userver: pytest_userver.client Namespace Reference
Loading...
Searching...
No Matches
pytest_userver.client Namespace Reference

Detailed Description

Python module that provides clients for functional tests with testsuite; see Functional service tests (testsuite) for an introduction.

Classes

class  BaseError
 Base class for exceptions of this module. More...
class  TestsuiteActionFailed
class  TestsuiteTaskError
class  TestsuiteTaskNotFound
class  TestsuiteTaskConflict
class  ConfigurationError
class  PeriodicTaskFailed
class  PeriodicTasksState
class  TestsuiteTaskFailed
class  TestsuiteClientConfig
class  ClientWrapper
 Base asyncio userver client that implements HTTP requests to service. More...
class  ClientMonitor
 Asyncio userver client for monitor listeners, typically retrieved from plugins.service_client.monitor_client fixture. More...
class  MetricsDiffer
 A helper class for computing metric differences. More...
class  Client
 Asyncio userver client, typically retrieved from plugins.service_client.service_client fixture. More...
class  _State
 Reflects the (supposed) current service state. More...
class  _StateManager
 Used for computing the requests that we need to automatically align the service state with the test fixtures state. More...

Functions

dict _task_check_response (str name, response)

Variables

TypeAlias JsonAny = int | float | str | list | dict
TypeAlias JsonAnyOptional = JsonAny | None
str _UNKNOWN_STATE = '__UNKNOWN__'
tuple CACHE_INVALIDATION_MESSAGE

Function Documentation

◆ _task_check_response()

dict _task_check_response ( str name,
response )
protected

Definition at line 1480 of file client.py.

Variable Documentation

◆ _UNKNOWN_STATE

str pytest_userver.client._UNKNOWN_STATE = '__UNKNOWN__'
protected

Definition at line 44 of file client.py.

◆ CACHE_INVALIDATION_MESSAGE

tuple pytest_userver.client.CACHE_INVALIDATION_MESSAGE
Initial value:
= (
'Direct cache invalidation is deprecated.\n'
'\n'
' - Use client.update_server_state() to synchronize service state\n'
' - Explicitly pass cache names to invalidate, e.g.: '
'invalidate_caches(cache_names=[...]).'
)

Definition at line 46 of file client.py.

◆ JsonAny

TypeAlias pytest_userver.client.JsonAny = int | float | str | list | dict

Definition at line 41 of file client.py.

◆ JsonAnyOptional

TypeAlias pytest_userver.client.JsonAnyOptional = JsonAny | None

Definition at line 42 of file client.py.