File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -543,9 +543,19 @@ def test_operations_client_client_options_credentials_file(
543543 with pytest .warns (DeprecationWarning ):
544544 options = client_options .ClientOptions (credentials_file = "credentials.json" )
545545 if "async" in str (client_class ):
546- # TODO(): Add support for credentials file to async REST transport.
547- with pytest .raises (core_exceptions .AsyncRestUnsupportedParameterError ):
548- client_class (client_options = options , transport = transport_name )
546+ with mock .patch .object (transport_class , "__init__" ) as patched :
547+ patched .return_value = None
548+ client = client_class (client_options = options , transport = transport_name )
549+ patched .assert_called_once_with (
550+ credentials = None ,
551+ credentials_file = "credentials.json" ,
552+ host = client .DEFAULT_ENDPOINT ,
553+ scopes = None ,
554+ client_cert_source_for_mtls = None ,
555+ quota_project_id = None ,
556+ client_info = transports .base .DEFAULT_CLIENT_INFO ,
557+ always_use_jwt_access = True ,
558+ )
549559 else :
550560 with mock .patch .object (transport_class , "__init__" ) as patched :
551561 patched .return_value = None
You can’t perform that action at this time.
0 commit comments