grpc.aio.ServicerContext.abort immediately sends the response status, before AsyncCallQueue has a chance to update its call log.
As a workaround, patch abort to delay the actual abort call until exit from AsyncCallQueue.
Definition at line 117 of file _servicer_mock.py.
Public Member Functions | |
| None | __init__ (self, grpc.aio.ServicerContext context) |
| None | abort (self, grpc.StatusCode code, str details='', Any trailing_metadata=tuple()) |
| Any | __getattr__ (self, str item) |
Protected Attributes | |
| _context = context | |
| None pytest_userver.grpc._servicer_mock._PatchedServicerContext.__init__ | ( | self, | |
| grpc.aio.ServicerContext | context ) |
Definition at line 124 of file _servicer_mock.py.
| Any pytest_userver.grpc._servicer_mock._PatchedServicerContext.__getattr__ | ( | self, | |
| str | item ) |
Definition at line 130 of file _servicer_mock.py.
| None pytest_userver.grpc._servicer_mock._PatchedServicerContext.abort | ( | self, | |
| grpc.StatusCode | code, | ||
| str | details = '', | ||
| Any | trailing_metadata = tuple() ) |
Definition at line 127 of file _servicer_mock.py.
|
protected |
Definition at line 125 of file _servicer_mock.py.