@@ -465,7 +465,7 @@ def test_device_flow(self):
465465
466466def get_lab_app (
467467 env_client_id = "LAB_APP_CLIENT_ID" ,
468- env_client_secret = "LAB_APP_CLIENT_SECRET" ,
468+ env_name2 = "LAB_APP_CLIENT_SECRET" , # A var name that hopefully avoids false alarm
469469 authority = "https://login.microsoftonline.com/"
470470 "72f988bf-86f1-41af-91ab-2d7cd011db47" , # Microsoft tenant ID
471471 timeout = None ,
@@ -477,18 +477,17 @@ def get_lab_app(
477477 logger .info (
478478 "Reading ENV variables %s and %s for lab app defined at "
479479 "https://docs.msidlab.com/accounts/confidentialclient.html" ,
480- env_client_id , env_client_secret )
481- if os .getenv (env_client_id ) and os .getenv (env_client_secret ):
480+ env_client_id , env_name2 )
481+ if os .getenv (env_client_id ) and os .getenv (env_name2 ):
482482 # A shortcut mainly for running tests on developer's local development machine
483483 # or it could be setup on Travis CI
484484 # https://docs.travis-ci.com/user/environment-variables/#defining-variables-in-repository-settings
485485 # Data came from here
486486 # https://docs.msidlab.com/accounts/confidentialclient.html
487487 client_id = os .getenv (env_client_id )
488- client_secret = os .getenv (env_client_secret )
488+ client_secret = os .getenv (env_name2 )
489489 else :
490- logger .info ("ENV variables %s and/or %s are not defined. Fall back to MSI." ,
491- env_client_id , env_client_secret )
490+ logger .info ("ENV variables are not defined. Fall back to MSI." )
492491 # See also https://microsoft.sharepoint-df.com/teams/MSIDLABSExtended/SitePages/Programmatically-accessing-LAB-API's.aspx
493492 raise unittest .SkipTest ("MSI-based mechanism has not been implemented yet" )
494493 return msal .ConfidentialClientApplication (
0 commit comments