aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py b/src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py
index 4d73be6204..5163ffe738 100644
--- a/src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py
+++ b/src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py
@@ -39,14 +39,18 @@ from grpc_reflection.v1alpha import reflection_pb2_grpc
from google.protobuf import descriptor_pool
from google.protobuf import descriptor_pb2
-from src.proto.grpc.testing.proto2 import empty2_extensions_pb2
from src.proto.grpc.testing import empty_pb2
+
+from src.proto.grpc.testing.proto2 import empty2_pb2
+from src.proto.grpc.testing.proto2 import empty2_extensions_pb2
+
from tests.unit.framework.common import test_constants
_EMPTY_PROTO_FILE_NAME = 'src/proto/grpc/testing/empty.proto'
_EMPTY_PROTO_SYMBOL_NAME = 'grpc.testing.Empty'
_SERVICE_NAMES = ('Angstrom', 'Bohr', 'Curie', 'Dyson', 'Einstein', 'Feynman',
'Galilei')
+_EMPTY_EXTENSIONS_SYMBOL_NAME = 'grpc.testing.proto2.EmptyWithExtensions'
def _file_descriptor_to_proto(descriptor):
@@ -109,13 +113,10 @@ class ReflectionServicerTest(unittest.TestCase):
)),)
self.assertSequenceEqual(expected_responses, responses)
- @unittest.skip(
- 'TODO(atash): implement file-containing-extension reflection '
- '(see https://github.com/google/protobuf/issues/2248)')
def testFileContainingExtension(self):
requests = (reflection_pb2.ServerReflectionRequest(
file_containing_extension=reflection_pb2.ExtensionRequest(
- containing_type='grpc.testing.proto2.Empty',
+ containing_type=_EMPTY_EXTENSIONS_SYMBOL_NAME,
extension_number=125,),
), reflection_pb2.ServerReflectionRequest(
file_containing_extension=reflection_pb2.ExtensionRequest(
@@ -127,7 +128,7 @@ class ReflectionServicerTest(unittest.TestCase):
valid_host='',
file_descriptor_response=reflection_pb2.FileDescriptorResponse(
file_descriptor_proto=(_file_descriptor_to_proto(
- empty_extensions_pb2.DESCRIPTOR),))),
+ empty2_extensions_pb2.DESCRIPTOR),))),
reflection_pb2.ServerReflectionResponse(
valid_host='',
error_response=reflection_pb2.ErrorResponse(