File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -351,11 +351,16 @@ def test_operations_client_client_options(
351351 with mock .patch .dict (
352352 os .environ , {"GOOGLE_API_USE_CLIENT_CERTIFICATE" : "Unsupported" }
353353 ):
354- if hasattr (google .auth .transport .mtls , "should_use_client_cert" ):
355- pytest .skip (
356- "The should_use_client_cert function is available in this "
357- "version of google-auth. Skipping this test."
358- )
354+ if not hasattr (google .auth .transport .mtls , "should_use_client_cert" ):
355+ with pytest .raises (ValueError ):
356+ client = client_class ()
357+ else :
358+ with mock .patch .object (transport_class , "__init__" ) as patched :
359+ patched .return_value = None
360+ client = client_class (
361+ credentials = ga_credentials .AnonymousCredentials (),
362+ transport = transport_name
363+ )
359364
360365 # Check the case quota_project_id is provided
361366 options = client_options .ClientOptions (quota_project_id = "octopus" )
You can’t perform that action at this time.
0 commit comments