@@ -50,16 +50,6 @@ def _file_descriptor_to_proto(descriptor):
50
50
51
51
class ReflectionServicerTest (unittest .TestCase ):
52
52
53
- # TODO(https://github.com/grpc/grpc/issues/17844)
54
- # Bazel + Python 3 will result in creating two different instance of
55
- # DESCRIPTOR for each message. So, the equal comparison between protobuf
56
- # returned by stub and manually crafted protobuf will always fail.
57
- def _assert_sequence_of_proto_equal (self , x , y ):
58
- self .assertSequenceEqual (
59
- list (map (lambda x : x .SerializeToString (), x )),
60
- list (map (lambda x : x .SerializeToString (), y )),
61
- )
62
-
63
53
def setUp (self ):
64
54
self ._server = test_common .test_server ()
65
55
reflection .enable_server_reflection (_SERVICE_NAMES , self ._server )
@@ -94,7 +84,7 @@ def testFileByName(self):
94
84
error_message = grpc .StatusCode .NOT_FOUND .value [1 ].encode (),
95
85
)),
96
86
)
97
- self ._assert_sequence_of_proto_equal (expected_responses , responses )
87
+ self .assertSequenceEqual (expected_responses , responses )
98
88
99
89
def testFileBySymbol (self ):
100
90
requests = (
@@ -118,7 +108,7 @@ def testFileBySymbol(self):
118
108
error_message = grpc .StatusCode .NOT_FOUND .value [1 ].encode (),
119
109
)),
120
110
)
121
- self ._assert_sequence_of_proto_equal (expected_responses , responses )
111
+ self .assertSequenceEqual (expected_responses , responses )
122
112
123
113
def testFileContainingExtension (self ):
124
114
requests = (
@@ -147,7 +137,7 @@ def testFileContainingExtension(self):
147
137
error_message = grpc .StatusCode .NOT_FOUND .value [1 ].encode (),
148
138
)),
149
139
)
150
- self ._assert_sequence_of_proto_equal (expected_responses , responses )
140
+ self .assertSequenceEqual (expected_responses , responses )
151
141
152
142
def testExtensionNumbersOfType (self ):
153
143
requests = (
@@ -172,7 +162,7 @@ def testExtensionNumbersOfType(self):
172
162
error_message = grpc .StatusCode .NOT_FOUND .value [1 ].encode (),
173
163
)),
174
164
)
175
- self ._assert_sequence_of_proto_equal (expected_responses , responses )
165
+ self .assertSequenceEqual (expected_responses , responses )
176
166
177
167
def testListServices (self ):
178
168
requests = (reflection_pb2 .ServerReflectionRequest (list_services = '' ,),)
@@ -183,7 +173,7 @@ def testListServices(self):
183
173
service = tuple (
184
174
reflection_pb2 .ServiceResponse (name = name )
185
175
for name in _SERVICE_NAMES ))),)
186
- self ._assert_sequence_of_proto_equal (expected_responses , responses )
176
+ self .assertSequenceEqual (expected_responses , responses )
187
177
188
178
def testReflectionServiceName (self ):
189
179
self .assertEqual (reflection .SERVICE_NAME ,
0 commit comments