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

Detailed Description

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
 

Constructor & Destructor Documentation

◆ __init__()

None pytest_userver.grpc._servicer_mock._PatchedServicerContext.__init__ ( self,
grpc.aio.ServicerContext context )

Definition at line 124 of file _servicer_mock.py.

Member Function Documentation

◆ __getattr__()

Any pytest_userver.grpc._servicer_mock._PatchedServicerContext.__getattr__ ( self,
str item )

Definition at line 130 of file _servicer_mock.py.

◆ abort()

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.

Member Data Documentation

◆ _context

pytest_userver.grpc._servicer_mock._PatchedServicerContext._context = context
protected

Definition at line 125 of file _servicer_mock.py.


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