|
|
@ -160,7 +160,7 @@ class _GenericHandler(grpc.GenericRpcHandler): |
|
|
|
|
|
|
|
|
|
|
|
def service(self, handler_details): |
|
|
|
def service(self, handler_details): |
|
|
|
self._called.set_result(None) |
|
|
|
self._called.set_result(None) |
|
|
|
return self._routing_table[handler_details.method] |
|
|
|
return self._routing_table.get(handler_details.method) |
|
|
|
|
|
|
|
|
|
|
|
async def wait_for_call(self): |
|
|
|
async def wait_for_call(self): |
|
|
|
await self._called |
|
|
|
await self._called |
|
|
@ -395,8 +395,7 @@ class TestServer(AioTestBase): |
|
|
|
await channel.unary_unary(_SIMPLE_UNARY_UNARY)(_REQUEST) |
|
|
|
await channel.unary_unary(_SIMPLE_UNARY_UNARY)(_REQUEST) |
|
|
|
|
|
|
|
|
|
|
|
async def test_unimplemented(self): |
|
|
|
async def test_unimplemented(self): |
|
|
|
async with aio.insecure_channel(self._server_target) as channel: |
|
|
|
call = self._channel.unary_unary(_UNIMPLEMENTED_METHOD) |
|
|
|
call = channel.unary_unary(_UNIMPLEMENTED_METHOD) |
|
|
|
|
|
|
|
with self.assertRaises(aio.AioRpcError) as exception_context: |
|
|
|
with self.assertRaises(aio.AioRpcError) as exception_context: |
|
|
|
await call(_REQUEST) |
|
|
|
await call(_REQUEST) |
|
|
|
rpc_error = exception_context.exception |
|
|
|
rpc_error = exception_context.exception |
|
|
|