Mocks for the gRPC servers.
Classes | |
class | GrpcServiceMock |
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. | |
grpc.aio.Server | grpc_mockserver (grpc_mockserver_endpoint) |
Returns the gRPC mocking server. | |
create_grpc_mock () | |
Creates the gRPC mock server for the provided type. | |
pytest_addoption (parser) | |
GrpcServiceMock | _create_servicer_mock (type servicer_class, *Optional[List[str]] stream_method_names=None, Optional[Callable[..., None]] before_call_hook=None) |
Variables | |
int | DEFAULT_PORT = 8091 |
|
protected |
Definition at line 134 of file mockserver.py.
pytest_userver.plugins.grpc.mockserver.pytest_addoption | ( | parser | ) |
Definition at line 119 of file mockserver.py.
int pytest_userver.plugins.grpc.mockserver.DEFAULT_PORT = 8091 |
Definition at line 20 of file mockserver.py.