Skip to content

Commit

Permalink
Use kwargs in test_subscriber_client (#8414)
Browse files Browse the repository at this point in the history
This prevents test failures in case the ordering of the keyword arguments to the `StreamingPullManager.open` is switched
  • Loading branch information
dgorelik authored and plamut committed Jun 19, 2019
1 parent 06507a9 commit 126474c
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ def test_subscribe(manager_open):

assert future._manager._subscription == "sub_name_a"
manager_open.assert_called_once_with(
mock.ANY, mock.sentinel.callback, future.set_exception
mock.ANY,
callback=mock.sentinel.callback,
on_callback_error=future.set_exception,
)


Expand All @@ -100,5 +102,7 @@ def test_subscribe_options(manager_open):
assert future._manager.flow_control == flow_control
assert future._manager._scheduler == scheduler
manager_open.assert_called_once_with(
mock.ANY, mock.sentinel.callback, future.set_exception
mock.ANY,
callback=mock.sentinel.callback,
on_callback_error=future.set_exception,
)

0 comments on commit 126474c

Please sign in to comment.