async def test_exception(self) -> None:
     async with server_in_event_loop() as addr:
         async with get_client(TestService, host=addr.ip,
                               port=addr.port) as client:
             res = await client.divide(6, 3)
             self.assertAlmostEqual(2, res)
             with self.assertRaises(ArithmeticException):
                 await client.divide(1, 0)
 async def test_client_type_and_protocol(self) -> None:
     async with server_in_event_loop() as addr:
         async with get_client(
                 TestService,
                 host=addr.ip,
                 port=addr.port,
                 client_type=ClientType.THRIFT_ROCKET_CLIENT_TYPE,
                 protocol=Protocol.BINARY,
         ) as client:
             sum = await client.add(1, 2)
             self.assertEqual(3, sum)
 async def test_oneway(self) -> None:
     async with server_in_event_loop() as addr:
         async with get_client(TestService, host=addr.ip,
                               port=addr.port) as client:
             res = await client.oneway()
             self.assertIsNone(res)
 async def test_void_return_with_exception(self) -> None:
     async with server_in_event_loop() as addr:
         async with get_client(TestService, host=addr.ip,
                               port=addr.port) as client:
             with self.assertRaises(EmptyException):
                 await client.oops()
 async def test_basic(self) -> None:
     async with server_in_event_loop() as addr:
         async with get_client(TestService, host=addr.ip,
                               port=addr.port) as client:
             sum = await client.add(1, 2)
             self.assertEqual(3, sum)