@@ -542,7 +542,7 @@ def test_credentials_and_credentials_file_mutually_exclusive(self):
542
542
543
543
class DiscoveryFromDocument (unittest .TestCase ):
544
544
MOCK_CREDENTIALS = mock .Mock (spec = google .auth .credentials .Credentials )
545
-
545
+ MOCK_CREDENTIALS . universe_domain = None
546
546
def test_can_build_from_local_document (self ):
547
547
discovery = read_datafile ("plus.json" )
548
548
plus = build_from_document (
@@ -694,6 +694,7 @@ def test_scopes_from_client_options(self):
694
694
discovery = read_datafile ("plus.json" )
695
695
696
696
with mock .patch ("googleapiclient._auth.default_credentials" ) as default :
697
+ default .return_value .universe_domain = None
697
698
plus = build_from_document (
698
699
discovery ,
699
700
client_options = {"scopes" : ["1" , "2" ]},
@@ -705,6 +706,7 @@ def test_quota_project_from_client_options(self):
705
706
discovery = read_datafile ("plus.json" )
706
707
707
708
with mock .patch ("googleapiclient._auth.default_credentials" ) as default :
709
+ default .return_value .universe_domain = None
708
710
plus = build_from_document (
709
711
discovery ,
710
712
client_options = google .api_core .client_options .ClientOptions (
@@ -718,6 +720,7 @@ def test_credentials_file_from_client_options(self):
718
720
discovery = read_datafile ("plus.json" )
719
721
720
722
with mock .patch ("googleapiclient._auth.credentials_from_file" ) as default :
723
+ default .return_value .universe_domain = None
721
724
plus = build_from_document (
722
725
discovery ,
723
726
client_options = google .api_core .client_options .ClientOptions (
@@ -773,6 +776,7 @@ def test_self_signed_jwt_disabled(self):
773
776
774
777
class DiscoveryFromDocumentMutualTLS (unittest .TestCase ):
775
778
MOCK_CREDENTIALS = mock .Mock (spec = google .auth .credentials .Credentials )
779
+ MOCK_CREDENTIALS .universe_domain = None
776
780
ADC_CERT_PATH = "adc_cert_path"
777
781
ADC_KEY_PATH = "adc_key_path"
778
782
ADC_PASSPHRASE = "adc_passphrase"
@@ -1529,6 +1533,7 @@ def test_plus_resources(self):
1529
1533
@unittest .skipIf (not HAS_OAUTH2CLIENT , "oauth2client unavailable." )
1530
1534
def test_oauth2client_credentials (self ):
1531
1535
credentials = mock .Mock (spec = GoogleCredentials )
1536
+ credentials .universe_domain = None
1532
1537
credentials .create_scoped_required .return_value = False
1533
1538
1534
1539
discovery = read_datafile ("plus.json" )
@@ -1537,6 +1542,7 @@ def test_oauth2client_credentials(self):
1537
1542
1538
1543
def test_google_auth_credentials (self ):
1539
1544
credentials = mock .Mock (spec = google .auth .credentials .Credentials )
1545
+ credentials .universe_domain = None
1540
1546
discovery = read_datafile ("plus.json" )
1541
1547
service = build_from_document (discovery , credentials = credentials )
1542
1548
0 commit comments