# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import os
import pytest
from dotenv import load_dotenv
from devtools_testutils import (
    test_proxy,
    add_general_regex_sanitizer,
    add_body_key_sanitizer,
    add_header_regex_sanitizer,
)

load_dotenv()


# For security, please avoid record sensitive identity information in recordings
@pytest.fixture(scope="session", autouse=True)
def add_sanitizers(test_proxy):
    individuallynestedwithpath_subscription_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHPATH_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithpath_tenant_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHPATH_TENANT_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithpath_client_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHPATH_CLIENT_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithpath_client_secret = os.environ.get(
        "INDIVIDUALLYNESTEDWITHPATH_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithpath_subscription_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithpath_tenant_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithpath_client_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithpath_client_secret, value="00000000-0000-0000-0000-000000000000"
    )

    individuallynestedwithquery_subscription_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHQUERY_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithquery_tenant_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHQUERY_TENANT_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithquery_client_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHQUERY_CLIENT_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithquery_client_secret = os.environ.get(
        "INDIVIDUALLYNESTEDWITHQUERY_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithquery_subscription_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithquery_tenant_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithquery_client_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithquery_client_secret, value="00000000-0000-0000-0000-000000000000"
    )

    individuallynestedwithheader_subscription_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHHEADER_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithheader_tenant_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHHEADER_TENANT_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithheader_client_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHHEADER_CLIENT_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithheader_client_secret = os.environ.get(
        "INDIVIDUALLYNESTEDWITHHEADER_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithheader_subscription_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithheader_tenant_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithheader_client_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithheader_client_secret, value="00000000-0000-0000-0000-000000000000"
    )

    individuallynestedwithmultiple_subscription_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHMULTIPLE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithmultiple_tenant_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHMULTIPLE_TENANT_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithmultiple_client_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHMULTIPLE_CLIENT_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithmultiple_client_secret = os.environ.get(
        "INDIVIDUALLYNESTEDWITHMULTIPLE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithmultiple_subscription_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithmultiple_tenant_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithmultiple_client_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithmultiple_client_secret, value="00000000-0000-0000-0000-000000000000"
    )

    individuallynestedwithmixed_subscription_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHMIXED_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithmixed_tenant_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHMIXED_TENANT_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithmixed_client_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHMIXED_CLIENT_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithmixed_client_secret = os.environ.get(
        "INDIVIDUALLYNESTEDWITHMIXED_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithmixed_subscription_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithmixed_tenant_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithmixed_client_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithmixed_client_secret, value="00000000-0000-0000-0000-000000000000"
    )

    individuallynestedwithparamalias_subscription_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHPARAMALIAS_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithparamalias_tenant_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHPARAMALIAS_TENANT_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithparamalias_client_id = os.environ.get(
        "INDIVIDUALLYNESTEDWITHPARAMALIAS_CLIENT_ID", "00000000-0000-0000-0000-000000000000"
    )
    individuallynestedwithparamalias_client_secret = os.environ.get(
        "INDIVIDUALLYNESTEDWITHPARAMALIAS_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithparamalias_subscription_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithparamalias_tenant_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithparamalias_client_id, value="00000000-0000-0000-0000-000000000000"
    )
    add_general_regex_sanitizer(
        regex=individuallynestedwithparamalias_client_secret, value="00000000-0000-0000-0000-000000000000"
    )

    add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]")
    add_header_regex_sanitizer(key="Cookie", value="cookie;")
    add_body_key_sanitizer(json_path="$..access_token", value="access_token")
