Skip to content

Commit

Permalink
fixing read from mgmt settings real for the azure credentials (#15692)
Browse files Browse the repository at this point in the history
* fixing read from mgmt settings real for the azure credentials

* using getattr for playback situations
  • Loading branch information
seankane-msft authored Dec 8, 2020
1 parent 14d9957 commit a24082e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/azure-sdk-tools/devtools_testutils/azure_testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ def tearDown(self):

def get_credential(self, client_class, **kwargs):

tenant_id = os.environ.get("AZURE_TENANT_ID", None)
client_id = os.environ.get("AZURE_CLIENT_ID", None)
secret = os.environ.get("AZURE_CLIENT_SECRET", None)
tenant_id = os.environ.get("AZURE_TENANT_ID", getattr(self._real_settings, "TENANT_ID", None))
client_id = os.environ.get("AZURE_CLIENT_ID", getattr(self._real_settings, "CLIENT_ID", None))
secret = os.environ.get("AZURE_CLIENT_SECRET", getattr(self._real_settings, "CLIENT_SECRET", None))
is_async = kwargs.pop("is_async", False)

if tenant_id and client_id and secret and self.is_live:
Expand Down

0 comments on commit a24082e

Please sign in to comment.