@@ -156,7 +156,7 @@ async def test_unary_unary_interceptor_op_not_found(self):
156156 """Test that interceptor call cuntinuation if op is not found"""
157157 instance = self ._make_one ()
158158 continuation = CrossSync .Mock ()
159- details = mock . Mock ()
159+ details = ClientCallDetails ()
160160 details .metadata = []
161161 request = mock .Mock ()
162162 await instance .intercept_unary_unary (continuation , details , request )
@@ -178,7 +178,7 @@ async def test_unary_unary_interceptor_success(self):
178178 call = continuation .return_value
179179 call .trailing_metadata = CrossSync .Mock (return_value = [("a" , "b" )])
180180 call .initial_metadata = CrossSync .Mock (return_value = [("c" , "d" )])
181- details = mock . Mock ()
181+ details = ClientCallDetails ()
182182 details .metadata = [(OPERATION_INTERCEPTOR_METADATA_KEY , op .uuid )]
183183 request = mock .Mock ()
184184 result = await instance .intercept_unary_unary (continuation , details , request )
@@ -203,7 +203,7 @@ async def test_unary_unary_interceptor_failure(self):
203203 exc .trailing_metadata = CrossSync .Mock (return_value = [("a" , "b" )])
204204 exc .initial_metadata = CrossSync .Mock (return_value = [("c" , "d" )])
205205 continuation = CrossSync .Mock (side_effect = exc )
206- details = mock . Mock ()
206+ details = ClientCallDetails ()
207207 details .metadata = [(OPERATION_INTERCEPTOR_METADATA_KEY , op .uuid )]
208208 request = mock .Mock ()
209209 with pytest .raises (RpcError ) as e :
@@ -230,7 +230,7 @@ async def test_unary_unary_interceptor_failure_no_metadata(self):
230230 call = continuation .return_value
231231 call .trailing_metadata = CrossSync .Mock (return_value = [("a" , "b" )])
232232 call .initial_metadata = CrossSync .Mock (return_value = [("c" , "d" )])
233- details = mock . Mock ()
233+ details = ClientCallDetails ()
234234 details .metadata = [(OPERATION_INTERCEPTOR_METADATA_KEY , op .uuid )]
235235 request = mock .Mock ()
236236 with pytest .raises (RpcError ) as e :
@@ -257,7 +257,7 @@ async def test_unary_unary_interceptor_failure_generic(self):
257257 call = continuation .return_value
258258 call .trailing_metadata = CrossSync .Mock (return_value = [("a" , "b" )])
259259 call .initial_metadata = CrossSync .Mock (return_value = [("c" , "d" )])
260- details = mock . Mock ()
260+ details = ClientCallDetails ()
261261 details .metadata = [(OPERATION_INTERCEPTOR_METADATA_KEY , op .uuid )]
262262 request = mock .Mock ()
263263 with pytest .raises (ValueError ) as e :
@@ -272,7 +272,7 @@ async def test_unary_stream_interceptor_op_not_found(self):
272272 """Test that interceptor calls continuation if op is not found"""
273273 instance = self ._make_one ()
274274 continuation = CrossSync .Mock ()
275- details = mock . Mock ()
275+ details = ClientCallDetails ()
276276 details .metadata = []
277277 request = mock .Mock ()
278278 await instance .intercept_unary_stream (continuation , details , request )
@@ -297,7 +297,7 @@ async def test_unary_stream_interceptor_success(self):
297297 call = continuation .return_value
298298 call .trailing_metadata = CrossSync .Mock (return_value = [("a" , "b" )])
299299 call .initial_metadata = CrossSync .Mock (return_value = [("c" , "d" )])
300- details = mock . Mock ()
300+ details = ClientCallDetails ()
301301 details .metadata = [(OPERATION_INTERCEPTOR_METADATA_KEY , op .uuid )]
302302 request = mock .Mock ()
303303 wrapper = await instance .intercept_unary_stream (continuation , details , request )
@@ -327,7 +327,7 @@ async def test_unary_stream_interceptor_failure_mid_stream(self):
327327 call = continuation .return_value
328328 call .trailing_metadata = CrossSync .Mock (return_value = [("a" , "b" )])
329329 call .initial_metadata = CrossSync .Mock (return_value = [("c" , "d" )])
330- details = mock . Mock ()
330+ details = ClientCallDetails ()
331331 details .metadata = [(OPERATION_INTERCEPTOR_METADATA_KEY , op .uuid )]
332332 request = mock .Mock ()
333333 wrapper = await instance .intercept_unary_stream (continuation , details , request )
@@ -359,7 +359,7 @@ async def test_unary_stream_interceptor_failure_start_stream(self):
359359
360360 continuation = CrossSync .Mock ()
361361 continuation .side_effect = exc
362- details = mock . Mock ()
362+ details = ClientCallDetails ()
363363 details .metadata = [(OPERATION_INTERCEPTOR_METADATA_KEY , op .uuid )]
364364 request = mock .Mock ()
365365 with pytest .raises (RpcError ) as e :
@@ -388,7 +388,7 @@ async def test_unary_stream_interceptor_failure_start_stream_no_metadata(self):
388388
389389 continuation = CrossSync .Mock ()
390390 continuation .side_effect = exc
391- details = mock . Mock ()
391+ details = ClientCallDetails ()
392392 details .metadata = [(OPERATION_INTERCEPTOR_METADATA_KEY , op .uuid )]
393393 request = mock .Mock ()
394394 with pytest .raises (RpcError ) as e :
@@ -417,7 +417,7 @@ async def test_unary_stream_interceptor_failure_start_stream_generic(self):
417417
418418 continuation = CrossSync .Mock ()
419419 continuation .side_effect = exc
420- details = mock . Mock ()
420+ details = ClientCallDetails ()
421421 details .metadata = [(OPERATION_INTERCEPTOR_METADATA_KEY , op .uuid )]
422422 request = mock .Mock ()
423423 with pytest .raises (ValueError ) as e :
@@ -447,7 +447,7 @@ async def test_unary_unary_interceptor_start_operation(self, initial_state):
447447 call = continuation .return_value
448448 call .trailing_metadata = CrossSync .Mock (return_value = [])
449449 call .initial_metadata = CrossSync .Mock (return_value = [])
450- details = mock . Mock ()
450+ details = ClientCallDetails ()
451451 details .metadata = [(OPERATION_INTERCEPTOR_METADATA_KEY , op .uuid )]
452452 request = mock .Mock ()
453453 await instance .intercept_unary_unary (continuation , details , request )
@@ -473,7 +473,7 @@ async def test_unary_stream_interceptor_start_operation(self, initial_state):
473473 call = continuation .return_value
474474 call .trailing_metadata = CrossSync .Mock (return_value = [])
475475 call .initial_metadata = CrossSync .Mock (return_value = [])
476- details = mock . Mock ()
476+ details = ClientCallDetails ()
477477 details .metadata = [(OPERATION_INTERCEPTOR_METADATA_KEY , op .uuid )]
478478 request = mock .Mock ()
479479 await instance .intercept_unary_stream (continuation , details , request )
0 commit comments