-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test generation for Mgmt SDK (#2677)
* fix for async paging * adopt for mpg * fix * changelog * inv * inv
- Loading branch information
Showing
34 changed files
with
2,397 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
changeKind: feature | ||
packages: | ||
- "@autorest/python" | ||
- "@azure-tools/typespec-python" | ||
--- | ||
|
||
Enable test generation for ARM SDK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 26 additions & 2 deletions
28
packages/typespec-python/generator/pygen/codegen/templates/test.py.jinja2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...pespec-python/test/azure/generated/azure-arm-models-resources/generated_tests/conftest.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# 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() | ||
|
||
|
||
# aovid record sensitive identity information in recordings | ||
@pytest.fixture(scope="session", autouse=True) | ||
def add_sanitizers(test_proxy): | ||
resources_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") | ||
resources_tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") | ||
resources_client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") | ||
resources_client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") | ||
add_general_regex_sanitizer(regex=resources_subscription_id, value="00000000-0000-0000-0000-000000000000") | ||
add_general_regex_sanitizer(regex=resources_tenant_id, value="00000000-0000-0000-0000-000000000000") | ||
add_general_regex_sanitizer(regex=resources_client_id, value="00000000-0000-0000-0000-000000000000") | ||
add_general_regex_sanitizer(regex=resources_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") |
Oops, something went wrong.