File: mgmt_recorded_testcase.py

package info (click to toggle)
python-azure 20230112%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 749,544 kB
  • sloc: python: 6,815,827; javascript: 287; makefile: 195; xml: 109; sh: 105
file content (19 lines) | stat: -rw-r--r-- 979 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from .azure_recorded_testcase import AzureRecordedTestCase


class AzureMgmtRecordedTestCase(AzureRecordedTestCase):
    """Test class for use by management-plane tests that use the azure-sdk-tools test proxy.

    For more details and usage examples, refer to
    https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md
    """

    def create_mgmt_client(self, client_class, **kwargs):
        subscription_id = self.get_settings_value("SUBSCRIPTION_ID")
        credential = self.get_credential(client_class)
        return self.create_client_from_credential(client_class, credential, subscription_id=subscription_id, **kwargs)