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

Detailed Description

Make gRPC requests to the service.

See also
gRPC client and service

Classes

class  _GenericClientInterceptor
 

Functions

int grpc_service_port (service_config)
 Returns the gRPC listener port number of the service that is set in the static configuration file.
 
str grpc_service_endpoint (service_config, grpc_service_port)
 Returns the gRPC endpoint of the service.
 
float grpc_service_timeout (pytestconfig)
 Returns the gRPC timeout for the service that is set by the command line option --service-timeout.
 
Callable[[grpc.aio.ClientCallDetails], Awaitable[None]] grpc_client_prepare (service_client, client.TestsuiteClientConfig _testsuite_client_config)
 Returns the function that will be called in before each gRPC request, client-side.
 
 _grpc_session_channel (grpc_service_endpoint, _grpc_channel_interceptor)
 
 grpc_channel (grpc_service_endpoint, grpc_service_deps, grpc_service_timeout, _grpc_session_channel, _grpc_channel_interceptor, grpc_client_prepare)
 Returns the gRPC channel configured by the parameters from the grpc_service_endpoint fixture.
 
 grpc_service_deps (service_client)
 gRPC service dependencies hook.
 
 userver_config_grpc_mockserver (grpc_mockserver_endpoint)
 Returns a function that adjusts the static config for testsuite.
 
_GenericClientInterceptor _grpc_channel_interceptor ()
 

Variables

float DEFAULT_TIMEOUT = 15.0
 
list USERVER_CONFIG_HOOKS = ['userver_config_grpc_mockserver']
 

Function Documentation

◆ _grpc_channel_interceptor()

_GenericClientInterceptor pytest_userver.plugins.grpc.client._grpc_channel_interceptor ( )
protected

Definition at line 200 of file client.py.

◆ _grpc_session_channel()

pytest_userver.plugins.grpc.client._grpc_session_channel ( grpc_service_endpoint,
_grpc_channel_interceptor )
protected

Definition at line 97 of file client.py.

Variable Documentation

◆ DEFAULT_TIMEOUT

float pytest_userver.plugins.grpc.client.DEFAULT_TIMEOUT = 15.0

Definition at line 19 of file client.py.

◆ USERVER_CONFIG_HOOKS

list pytest_userver.plugins.grpc.client.USERVER_CONFIG_HOOKS = ['userver_config_grpc_mockserver']

Definition at line 21 of file client.py.