Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit 4b216f5

Browse files
committed
fix(async_grpc_client): update type hint for client_options parameter in AsyncGrpcClient
1 parent 124c0f7 commit 4b216f5

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

google/cloud/storage/_experimental/asyncio/async_grpc_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class AsyncGrpcClient:
3333
The client info used to send a user-agent string along with API
3434
requests. If ``None``, then default info will be used.
3535
36-
:type client_options: :class:`~google.api_core.client_options.ClientOptions` or :class:`dict`
36+
:type client_options: :class:`~google.api_core.client_options.ClientOptions`
3737
:param client_options: (Optional) Client options used to set user options
3838
on the client.
3939

tests/unit/asyncio/test_async_grpc_client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,18 @@ def _make_credentials(spec=None):
3232
class TestAsyncGrpcClient(unittest.TestCase):
3333
@mock.patch("google.cloud._storage_v2.StorageAsyncClient")
3434
def test_constructor_default_options(self, mock_async_storage_client):
35-
35+
# Arrange
3636
mock_transport_cls = mock.MagicMock()
3737
mock_async_storage_client.get_transport_class.return_value = mock_transport_cls
3838
mock_creds = _make_credentials()
3939

40-
async_grpc_client.AsyncGrpcClient(credentials=mock_creds)
41-
4240
primary_user_agent = DEFAULT_CLIENT_INFO.to_user_agent()
4341
expected_options = (("grpc.primary_user_agent", primary_user_agent),)
4442

43+
# Act
44+
async_grpc_client.AsyncGrpcClient(credentials=mock_creds)
45+
46+
# Assert
4547
mock_async_storage_client.get_transport_class.assert_called_once_with(
4648
"grpc_asyncio"
4749
)

0 commit comments

Comments
 (0)