diff --git a/src/python/grpcio_tests/tests_aio/unit/_test_server.py b/src/python/grpcio_tests/tests_aio/unit/_test_server.py index 6face0ae41e..7a8a3139e12 100644 --- a/src/python/grpcio_tests/tests_aio/unit/_test_server.py +++ b/src/python/grpcio_tests/tests_aio/unit/_test_server.py @@ -24,10 +24,6 @@ from tests_aio.unit import _constants _INITIAL_METADATA_KEY = "x-grpc-test-echo-initial" _TRAILING_METADATA_KEY = "x-grpc-test-echo-trailing-bin" -_PRIVATE_KEY = resources.private_key() -_CERTIFICATE_CHAIN = resources.certificate_chain() -_TEST_ROOT_CERTIFICATES = resources.test_root_certificates() -_SERVER_CERTS = ((_PRIVATE_KEY, _CERTIFICATE_CHAIN),) async def _maybe_echo_metadata(servicer_context): diff --git a/src/python/grpcio_tests/tests_aio/unit/call_test.py b/src/python/grpcio_tests/tests_aio/unit/call_test.py index 13181028b9c..a5972f838f1 100644 --- a/src/python/grpcio_tests/tests_aio/unit/call_test.py +++ b/src/python/grpcio_tests/tests_aio/unit/call_test.py @@ -34,10 +34,7 @@ _LOCAL_CANCEL_DETAILS_EXPECTATION = 'Locally cancelled by application!' _RESPONSE_INTERVAL_US = test_constants.SHORT_TIMEOUT * 1000 * 1000 _UNREACHABLE_TARGET = '0.1:1111' _INFINITE_INTERVAL_US = 2**31 - 1 - -_PRIVATE_KEY = resources.private_key() -_CERTIFICATE_CHAIN = resources.certificate_chain() -_TEST_ROOT_CERTIFICATES = resources.test_root_certificates() +_SERVER_HOST_OVERRIDE = 'foo.test.google.fr' class _MulticallableTestMixin(): @@ -65,7 +62,6 @@ class _SecureCallMixin: self._server_address, self._server = await start_test_server( secure=True, server_credentials=server_credentials) - _SERVER_HOST_OVERRIDE = 'foo.test.google.fr' channel_options = ( ( 'grpc.ssl_target_name_override', @@ -250,6 +246,7 @@ class TestUnaryUnarySecureCall(_SecureCallMixin, AioTestBase): call = self._stub.UnaryCall(messages_pb2.SimpleRequest()) response = await call self.assertIsInstance(response, messages_pb2.SimpleResponse) + self.assertEqual(await call.code(), grpc.StatusCode.OK) class TestUnaryStreamCall(_MulticallableTestMixin, AioTestBase):