userver: pytest_userver.grpc._mocked_errors.TimeoutError Class Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
pytest_userver.grpc._mocked_errors.TimeoutError Class Reference

Detailed Description

When thrown from a mocked handler, leads to ugrpc.client.RpcInterruptedError.

Note
Exported as pytest_userver.grpc.TimeoutError.

Example:

async def test_timeout_fail(service_client, grpc_mockserver):
@grpc_mockserver(greeter_services.GreeterServiceServicer.SayHello)
async def mock_say_hello(request, context):
with pytest.raises(pytest_userver.client.TestsuiteTaskFailed) as ex_info:
await service_client.run_task('call-say-hello')
ex_info.match("'samples.api.GreeterService/SayHello' failed: interrupted at Testsuite timeout")

Definition at line 10 of file _mocked_errors.py.

+ Inheritance diagram for pytest_userver.grpc._mocked_errors.TimeoutError:

Static Public Attributes

str ERROR_CODE = 'unknown'
 

Member Data Documentation

◆ ERROR_CODE

str pytest_userver.grpc._mocked_errors.MockedError.ERROR_CODE = 'unknown'
staticinherited

Definition at line 7 of file _mocked_errors.py.


The documentation for this class was generated from the following file: