Skip to content

Commit b3218b7

Browse files
committed
fix(api-core): pass AnonymousCredentials to OperationsTransport in test_operations_client.py
1 parent 5c7e6e2 commit b3218b7

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

packages/google-api-core/google/api_core/gapic_v1/requests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
if they are not already set.
2222
"""
2323

24-
from typing import Union
2524
import uuid
25+
from typing import Union
2626

2727
import google.protobuf.message
2828

packages/google-api-core/tests/unit/gapic/test_requests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
from google.api_core.gapic_v1.requests import setup_request_id
2121

22-
2322
# --- Mock Request Helper Classes ---
2423

2524

packages/google-api-core/tests/unit/operations_v1/test_operations_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,15 @@ def test_operations_client_config():
103103

104104

105105
def test_operations_v1_transport_base_to_dict_protobuf_versions(monkeypatch):
106+
from google.auth import credentials as ga_credentials
106107
from google.longrunning import operations_pb2
107108

108109
from google.api_core.operations_v1.transports import base
109110

110111
message = operations_pb2.Operation(name="test_op")
111-
transport = base.OperationsTransport()
112+
transport = base.OperationsTransport(
113+
credentials=ga_credentials.AnonymousCredentials()
114+
)
112115

113116
monkeypatch.setattr(base, "PROTOBUF_VERSION", "3.20.0")
114117
res3 = transport._convert_protobuf_message_to_dict(message)

0 commit comments

Comments
 (0)