@@ -91,6 +91,7 @@ def test__wrap_callback_errors_error():
9191
9292
9393def test_constructor_and_default_state ():
94+ mock .sentinel .subscription = str ()
9495 manager = streaming_pull_manager .StreamingPullManager (
9596 mock .sentinel .client , mock .sentinel .subscription
9697 )
@@ -113,6 +114,7 @@ def test_constructor_and_default_state():
113114
114115
115116def test_constructor_with_default_options ():
117+ mock .sentinel .subscription = str ()
116118 flow_control_ = types .FlowControl ()
117119 manager = streaming_pull_manager .StreamingPullManager (
118120 mock .sentinel .client ,
@@ -128,6 +130,7 @@ def test_constructor_with_default_options():
128130
129131
130132def test_constructor_with_min_and_max_duration_per_lease_extension_ ():
133+ mock .sentinel .subscription = str ()
131134 flow_control_ = types .FlowControl (
132135 min_duration_per_lease_extension = 15 , max_duration_per_lease_extension = 20
133136 )
@@ -142,6 +145,7 @@ def test_constructor_with_min_and_max_duration_per_lease_extension_():
142145
143146
144147def test_constructor_with_min_duration_per_lease_extension_too_low ():
148+ mock .sentinel .subscription = str ()
145149 flow_control_ = types .FlowControl (
146150 min_duration_per_lease_extension = 9 , max_duration_per_lease_extension = 9
147151 )
@@ -156,6 +160,7 @@ def test_constructor_with_min_duration_per_lease_extension_too_low():
156160
157161
158162def test_constructor_with_max_duration_per_lease_extension_too_high ():
163+ mock .sentinel .subscription = str ()
159164 flow_control_ = types .FlowControl (
160165 max_duration_per_lease_extension = 601 , min_duration_per_lease_extension = 601
161166 )
@@ -1181,6 +1186,7 @@ def test_open(heartbeater, dispatcher, leaser, background_consumer, resumable_bi
11811186 initial_request = mock .ANY ,
11821187 should_recover = manager ._should_recover ,
11831188 should_terminate = manager ._should_terminate ,
1189+ metadata = manager ._stream_metadata ,
11841190 throttle_reopen = True ,
11851191 )
11861192 initial_request_arg = resumable_bidi_rpc .call_args .kwargs ["initial_request" ]
0 commit comments