userver: pytest_userver.grpc._servicer_mock._PatchedServicerContext Class Reference
Loading...
Searching...
No Matches
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 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
 

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 122 of file _servicer_mock.py.

Member Function Documentation

◆ __getattr__()

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

Definition at line 131 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 125 of file _servicer_mock.py.

◆ abort_with_status()

None pytest_userver.grpc._servicer_mock._PatchedServicerContext.abort_with_status ( self,
grpc.Status status )

Definition at line 128 of file _servicer_mock.py.

Member Data Documentation

◆ _context

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

Definition at line 123 of file _servicer_mock.py.


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