|
| 1 | +# coding=utf-8 |
| 2 | +# -------------------------------------------------------------------------- |
| 3 | +# Copyright (c) Microsoft Corporation. All rights reserved. |
| 4 | +# Licensed under the MIT License. See License.txt in the project root for license information. |
| 5 | +# Code generated by Microsoft (R) AutoRest Code Generator. |
| 6 | +# Changes may cause incorrect behavior and will be lost if the code is regenerated. |
| 7 | +# -------------------------------------------------------------------------- |
| 8 | +import os |
| 9 | +import pytest |
| 10 | +from dotenv import load_dotenv |
| 11 | +from devtools_testutils import ( |
| 12 | + test_proxy, |
| 13 | + add_general_regex_sanitizer, |
| 14 | + add_body_key_sanitizer, |
| 15 | + add_header_regex_sanitizer, |
| 16 | +) |
| 17 | + |
| 18 | +load_dotenv() |
| 19 | + |
| 20 | + |
| 21 | +# aovid record sensitive identity information in recordings |
| 22 | +@pytest.fixture(scope="session", autouse=True) |
| 23 | +def add_sanitizers(test_proxy): |
| 24 | + networkmanagement_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") |
| 25 | + networkmanagement_tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") |
| 26 | + networkmanagement_client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") |
| 27 | + networkmanagement_client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") |
| 28 | + add_general_regex_sanitizer(regex=networkmanagement_subscription_id, value="00000000-0000-0000-0000-000000000000") |
| 29 | + add_general_regex_sanitizer(regex=networkmanagement_tenant_id, value="00000000-0000-0000-0000-000000000000") |
| 30 | + add_general_regex_sanitizer(regex=networkmanagement_client_id, value="00000000-0000-0000-0000-000000000000") |
| 31 | + add_general_regex_sanitizer(regex=networkmanagement_client_secret, value="00000000-0000-0000-0000-000000000000") |
| 32 | + |
| 33 | + add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") |
| 34 | + add_header_regex_sanitizer(key="Cookie", value="cookie;") |
| 35 | + add_body_key_sanitizer(json_path="$..access_token", value="access_token") |
0 commit comments