2424from azure .datalake .store .lib import auth
2525from azure .datalake .store .lib import DataLakeCredential
2626from tests .testing import azure , azure_teardown , posix , working_dir
27+ from tests .settings import TENANT_ID , CLIENT_ID
2728test_dir = working_dir ()
2829
2930a = posix (test_dir / 'a' )
@@ -102,7 +103,7 @@ def __test_retry_auth(error_code, error_string, is_exception_expected, total_tri
102103 end_point = re .compile ("https:\/\/login\.microsoftonline\.com\/common\/discovery\/instance\?authorization_endpoint=.+" )
103104 mock_url = "https://login.microsoftonline.com/" + settings .TENANT_ID + "/oauth2/token"
104105
105- body_discovery = r'{"tenant_discovery_endpoint":"https://login.microsoftonline.com/' + settings . TENANT_ID + '/.well-known/openid-configuration"}'
106+ body_discovery = r'{"tenant_discovery_endpoint":"https://login.microsoftonline.com/' + TENANT_ID + '/.well-known/openid-configuration"}'
106107 while total_tries > 0 :
107108 responses .add (responses .GET , end_point ,
108109 body = body_discovery ,
@@ -117,7 +118,8 @@ def __test_retry_auth(error_code, error_string, is_exception_expected, total_tri
117118 status = 200 )
118119 responses .add (responses .POST , mock_url , body = last_try_body , status = last_try_status )
119120 try :
120- token = auth ()
121+ token = auth (tenant_id = TENANT_ID , client_secret = 'GARBAGE' ,
122+ client_id = CLIENT_ID )
121123 assert isinstance (token , DataLakeCredential )
122124 assert not is_exception_expected
123125 except (HTTPError , adal .adal_error .AdalError ):
0 commit comments