|
28 | 28 | from tests.broker_util import is_pymsalruntime_installed |
29 | 29 | from tests.lab_config import ( |
30 | 30 | get_user_config, get_app_config, get_user_password, get_secret, |
31 | | - UserSecrets, AppSecrets, LAB_APP_CLIENT_ID, _clean_env, |
| 31 | + UserSecrets, AppSecrets, LAB_APP_CLIENT_ID, clean_env, |
32 | 32 | ) |
33 | 33 |
|
34 | 34 |
|
@@ -345,7 +345,7 @@ class PublicCloudScenariosTestCase(E2eTestCase): |
345 | 345 |
|
346 | 346 | @classmethod |
347 | 347 | def setUpClass(cls): |
348 | | - if not _clean_env("LAB_APP_CLIENT_CERT_PFX_PATH"): |
| 348 | + if not clean_env("LAB_APP_CLIENT_CERT_PFX_PATH"): |
349 | 349 | raise unittest.SkipTest( |
350 | 350 | "LAB_APP_CLIENT_CERT_PFX_PATH not set; skipping PublicCloud e2e tests") |
351 | 351 | pca_app = get_app_config(AppSecrets.PCA_CLIENT) |
@@ -428,7 +428,7 @@ def test_client_secret(self): |
428 | 428 |
|
429 | 429 | def test_subject_name_issuer_authentication(self): |
430 | 430 | from tests.lab_config import get_client_certificate |
431 | | - if not _clean_env("LAB_APP_CLIENT_CERT_PFX_PATH"): |
| 431 | + if not clean_env("LAB_APP_CLIENT_CERT_PFX_PATH"): |
432 | 432 | self.skipTest("LAB_APP_CLIENT_CERT_PFX_PATH not set") |
433 | 433 |
|
434 | 434 | self.app = msal.ConfidentialClientApplication( |
@@ -471,7 +471,7 @@ def get_lab_app( |
471 | 471 | "Reading ENV variable %s for lab app defined at " |
472 | 472 | "https://docs.msidlab.com/accounts/confidentialclient.html", |
473 | 473 | env_client_cert_path) |
474 | | - cert_path = _clean_env(env_client_cert_path) |
| 474 | + cert_path = clean_env(env_client_cert_path) |
475 | 475 | if cert_path: |
476 | 476 | # id came from https://docs.msidlab.com/accounts/confidentialclient.html |
477 | 477 | client_credential = { |
@@ -1167,11 +1167,10 @@ def _test_acquire_token_for_client(self, configured_region, expected_region): |
1167 | 1167 | |
1168 | 1168 | Uses the lab app certificate for authentication. |
1169 | 1169 | """ |
1170 | | - import os |
1171 | 1170 | from tests.lab_config import get_client_certificate |
1172 | 1171 |
|
1173 | 1172 | # Get client ID from lab_config constant and certificate from lab_config |
1174 | | - if not _clean_env("LAB_APP_CLIENT_CERT_PFX_PATH"): |
| 1173 | + if not clean_env("LAB_APP_CLIENT_CERT_PFX_PATH"): |
1175 | 1174 | self.skipTest("LAB_APP_CLIENT_CERT_PFX_PATH is required") |
1176 | 1175 | client_credential = get_client_certificate() |
1177 | 1176 |
|
|
0 commit comments