userver: pytest_userver.plugins.grpc.mockserver Namespace Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
pytest_userver.plugins.grpc.mockserver Namespace Reference

Your opinion will help to improve our service

Leave a feedback >

Detailed Description

Mocks for the gRPC servers.

See also
gRPC client and service

Classes

class  GrpcMockserver
 Allows to install mocks that are reset between tests, see grpc_mockserver_new. More...
 
class  GrpcMockserverSession
 Allows to install mocks that are kept active between tests, see grpc_mockserver_session. More...
 

Functions

str grpc_mockserver_endpoint (pytestconfig, get_free_port)
 Returns the gRPC endpoint to start the mocking server that is set by command line --grpc-mockserver-host and --grpc-mockserver-port options.
 
GrpcMockserverSession grpc_mockserver_session (grpc_mockserver_endpoint)
 Returns the gRPC mocking server.
 
GrpcMockserver grpc_mockserver_new (grpc_mockserver_session)
 Returns the gRPC mocking server.
 
 userver_config_grpc_mockserver (grpc_mockserver_endpoint)
 Returns a function that adjusts the static config for testsuite.
 
grpc.aio.Server grpc_mockserver (grpc_mockserver_session)
 Returns the gRPC mocking server.
 
 create_grpc_mock ()
 Creates the gRPC mock server for the provided type.
 

Variables

 MockDecorator = Callable[[Callable], callinfo.AsyncCallQueue]
 

Variable Documentation

◆ MockDecorator

pytest_userver.plugins.grpc.mockserver.MockDecorator = Callable[[Callable], callinfo.AsyncCallQueue]

Definition at line 28 of file mockserver.py.