Skip to content

Commit a3c8aa1

Browse files
authored
Fix tests after grpcio update (#5333)
* Fix tests after grpcio update * add test for close stub for coverage
1 parent b7a522b commit a3c8aa1

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

google/api_core/grpc_helpers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,3 +358,7 @@ def subscribe(self, callback, try_to_connect=False):
358358
def unsubscribe(self, callback):
359359
"""grpc.Channel.unsubscribe implementation."""
360360
pass
361+
362+
def close(self):
363+
"""grpc.Channel.close implementation."""
364+
pass

tests/unit/test_grpc_helpers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,3 +375,7 @@ def test_subscribe_unsubscribe(self):
375375
channel = grpc_helpers.ChannelStub()
376376
assert channel.subscribe(None) is None
377377
assert channel.unsubscribe(None) is None
378+
379+
def test_close(self):
380+
channel = grpc_helpers.ChannelStub()
381+
assert channel.close() is None

0 commit comments

Comments
 (0)