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 115 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()) |
| None | abort_with_status (self, grpc.Status status) |
| 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 122 of file _servicer_mock.py.
| Any pytest_userver.grpc._servicer_mock._PatchedServicerContext.__getattr__ | ( | self, | |
| str | item ) |
Definition at line 131 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 125 of file _servicer_mock.py.
| None pytest_userver.grpc._servicer_mock._PatchedServicerContext.abort_with_status | ( | self, | |
| grpc.Status | status ) |
Definition at line 128 of file _servicer_mock.py.
|
protected |
Definition at line 123 of file _servicer_mock.py.