From 885bb4ffc20332a74e9d1fdfdd79a84259a08cbd Mon Sep 17 00:00:00 2001 From: "Chenxi Jiang (WICRESOFT NORTH AMERICA LTD)" Date: Tue, 11 Feb 2025 10:21:09 +0800 Subject: [PATCH 1/2] update testcases --- ...test_azure_arm_operationtemplates_async.py | 92 ++++++++ .../test_azure_arm_resource_async.py | 202 +++++++++++++++++- .../test_azure_arm_operationtemplates.py | 80 +++++++ .../mock_api_tests/test_azure_arm_resource.py | 190 +++++++++++++++- .../test/azure/requirements.txt | 1 + 5 files changed, 559 insertions(+), 6 deletions(-) create mode 100644 packages/typespec-python/test/azure/mock_api_tests/asynctests/test_azure_arm_operationtemplates_async.py create mode 100644 packages/typespec-python/test/azure/mock_api_tests/test_azure_arm_operationtemplates.py diff --git a/packages/typespec-python/test/azure/mock_api_tests/asynctests/test_azure_arm_operationtemplates_async.py b/packages/typespec-python/test/azure/mock_api_tests/asynctests/test_azure_arm_operationtemplates_async.py new file mode 100644 index 00000000000..bb6f807e44c --- /dev/null +++ b/packages/typespec-python/test/azure/mock_api_tests/asynctests/test_azure_arm_operationtemplates_async.py @@ -0,0 +1,92 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.operationtemplates.aio import OperationTemplatesClient +from azure.resourcemanager.operationtemplates import models + +SUBSCRIPTION_ID = "00000000-0000-0000-0000-000000000000" +RESOURCE_GROUP_NAME = "test-rg" + + +@pytest.fixture +async def client(credential, authentication_policy): + async with OperationTemplatesClient( + credential, + SUBSCRIPTION_ID, + "http://localhost:3000", + authentication_policy=authentication_policy, + ) as client: + yield client + + +@pytest.mark.asyncio +async def test_check_name_availability_check_global(client): + result = await client.check_name_availability.check_global( + body=models.CheckNameAvailabilityRequest(name="checkName", type="Microsoft.Web/site") + ) + assert result.name_available == False + assert result.reason == models.CheckNameAvailabilityReason.ALREADY_EXISTS + assert result.message == "Hostname 'checkName' already exists. Please select a different name." + + +@pytest.mark.asyncio +async def test_check_name_availability_check_local(client): + result = await client.check_name_availability.check_local( + location="westus", + body=models.CheckNameAvailabilityRequest(name="checkName", type="Microsoft.Web/site"), + ) + assert result.name_available == False + assert result.reason == models.CheckNameAvailabilityReason.ALREADY_EXISTS + assert result.message == "Hostname 'checkName' already exists. Please select a different name." + + +@pytest.mark.asyncio +async def test_operations_list(client): + result = client.operations.list() + assert result + + +@pytest.mark.asyncio +async def test_lro_begin_create_or_replace(client): + result = await ( + await client.lro.begin_create_or_replace( + resource_group_name=RESOURCE_GROUP_NAME, + order_name="order1", + resource=models.Order( + location="eastus", + properties=models.OrderProperties(product_id="product1", amount=1), + ), + ) + ).result() + assert result.name == "order1" + assert ( + result.id + == "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.OperationTemplates/orders/order1" + ) + assert result.type == "Azure.ResourceManager.Resources/orders" + assert result.location == "eastus" + assert result.system_data.created_by == "AzureSDK" + + +@pytest.mark.asyncio +async def test_lro_begin_export(client): + await ( + await client.lro.begin_export( + resource_group_name=RESOURCE_GROUP_NAME, + order_name="order1", + body=models.ExportRequest(format="csv"), + ) + ).result() + + +@pytest.mark.asyncio +async def test_lro_begin_delete(client): + await ( + await client.lro.begin_delete( + resource_group_name=RESOURCE_GROUP_NAME, + order_name="order1", + ) + ).result() diff --git a/packages/typespec-python/test/azure/mock_api_tests/asynctests/test_azure_arm_resource_async.py b/packages/typespec-python/test/azure/mock_api_tests/asynctests/test_azure_arm_resource_async.py index abf03c911c9..8da75bfe249 100644 --- a/packages/typespec-python/test/azure/mock_api_tests/asynctests/test_azure_arm_resource_async.py +++ b/packages/typespec-python/test/azure/mock_api_tests/asynctests/test_azure_arm_resource_async.py @@ -14,7 +14,10 @@ @pytest.fixture async def client(credential, authentication_policy): async with ResourcesClient( - credential, SUBSCRIPTION_ID, "http://localhost:3000", authentication_policy=authentication_policy + credential, + SUBSCRIPTION_ID, + "http://localhost:3000", + authentication_policy=authentication_policy, ) as client: yield client @@ -23,7 +26,10 @@ async def client(credential, authentication_policy): async def test_client_signature(credential, authentication_policy): # make sure signautre order is correct client1 = ResourcesClient( - credential, SUBSCRIPTION_ID, "http://localhost:3000", authentication_policy=authentication_policy + credential, + SUBSCRIPTION_ID, + "http://localhost:3000", + authentication_policy=authentication_policy, ) # make sure signautre name is correct client2 = ResourcesClient( @@ -36,7 +42,10 @@ async def test_client_signature(credential, authentication_policy): # make sure signautre order is correct await client.top_level.get(RESOURCE_GROUP_NAME, "top") # make sure signautre name is correct - await client.top_level.get(resource_group_name=RESOURCE_GROUP_NAME, top_level_tracked_resource_name="top") + await client.top_level.get( + resource_group_name=RESOURCE_GROUP_NAME, + top_level_tracked_resource_name="top", + ) @pytest.mark.asyncio @@ -280,3 +289,190 @@ async def test_singleton_list_by_resource_group(client): assert result.name == "default" assert result.type == "Azure.ResourceManager.Resources/singletonTrackedResources" assert result.system_data.created_by == "AzureSDK" + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "scope", + [ + "", + "/subscriptions/00000000-0000-0000-0000-000000000000", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Resources/topLevelTrackedResources/top", + ], +) +async def test_extensions_resources_begin_create_or_update(client, scope): + result = await ( + await client.extensions_resources.begin_create_or_update( + resource_uri=scope, + extensions_resource_name="extension", + resource=models.ExtensionsResource(properties=models.ExtensionsResourceProperties(description="valid")), + ) + ).result() + assert result.id == f"{scope}/providers/Azure.ResourceManager.Resources/extensionsResources/extension" + assert result.name == "extension" + assert result.type == "Azure.ResourceManager.Resources/extensionsResources" + assert result.properties.description == "valid" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "scope", + [ + "", + "/subscriptions/00000000-0000-0000-0000-000000000000", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Resources/topLevelTrackedResources/top", + ], +) +async def test_extensions_resources_update(client, scope): + result = await client.extensions_resources.update( + resource_uri=scope, + extensions_resource_name="extension", + properties=models.ExtensionsResource(properties=models.ExtensionsResourceProperties(description="valid2")), + ) + assert result.id == f"{scope}/providers/Azure.ResourceManager.Resources/extensionsResources/extension" + assert result.name == "extension" + assert result.type == "Azure.ResourceManager.Resources/extensionsResources" + assert result.properties.description == "valid2" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "scope", + [ + "", + "/subscriptions/00000000-0000-0000-0000-000000000000", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Resources/topLevelTrackedResources/top", + ], +) +async def test_extensions_resources_get(client, scope): + result = await client.extensions_resources.get(resource_uri=scope, extensions_resource_name="extension") + assert result.id == f"{scope}/providers/Azure.ResourceManager.Resources/extensionsResources/extension" + assert result.name == "extension" + assert result.type == "Azure.ResourceManager.Resources/extensionsResources" + assert result.properties.description == "valid" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "scope", + [ + "", + "/subscriptions/00000000-0000-0000-0000-000000000000", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Resources/topLevelTrackedResources/top", + ], +) +async def test_extensions_resources_list_by_scope(client, scope): + response = client.extensions_resources.list_by_scope( + resource_uri=scope, + ) + result = [r async for r in response] + for result in result: + assert result.id == f"{scope}/providers/Azure.ResourceManager.Resources/extensionsResources/extension" + assert result.name == "extension" + assert result.type == "Azure.ResourceManager.Resources/extensionsResources" + assert result.properties.description == "valid" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "scope", + [ + "", + "/subscriptions/00000000-0000-0000-0000-000000000000", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Resources/topLevelTrackedResources/top", + ], +) +async def test_extensions_resources_delete(client, scope): + await client.extensions_resources.delete(resource_uri=scope, extensions_resource_name="extension") + + +@pytest.mark.asyncio +async def test_location_resources_create_or_update(client): + result = await client.location_resources.create_or_update( + location="eastus", + location_resource_name="resource", + resource=models.LocationResource(properties=models.LocationResourceProperties(description="valid")), + ) + assert ( + result.id + == "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource" + ) + assert result.name == "resource" + assert result.type == "Azure.ResourceManager.Resources/locationResources" + assert result.properties.description == "valid" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" + + +@pytest.mark.asyncio +async def test_location_resources_update(client): + result = await client.location_resources.update( + location="eastus", + location_resource_name="resource", + properties=models.LocationResource(properties=models.LocationResourceProperties(description="valid2")), + ) + assert ( + result.id + == "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource" + ) + assert result.name == "resource" + assert result.type == "Azure.ResourceManager.Resources/locationResources" + assert result.properties.description == "valid2" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" + + +@pytest.mark.asyncio +async def test_location_resources_get(client): + result = await client.location_resources.get( + location="eastus", + location_resource_name="resource", + ) + assert ( + result.id + == "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource" + ) + assert result.name == "resource" + assert result.type == "Azure.ResourceManager.Resources/locationResources" + assert result.properties.description == "valid" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" + + +@pytest.mark.asyncio +async def test_location_resources_delete(client): + await client.location_resources.delete( + location="eastus", + location_resource_name="resource", + ) + + +@pytest.mark.asyncio +async def test_location_resources_list_by_location(client): + response = client.location_resources.list_by_location( + location="eastus", + ) + result = [r async for r in response] + for result in result: + assert ( + result.id + == "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource" + ) + assert result.name == "resource" + assert result.type == "Azure.ResourceManager.Resources/locationResources" + assert result.properties.description == "valid" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" diff --git a/packages/typespec-python/test/azure/mock_api_tests/test_azure_arm_operationtemplates.py b/packages/typespec-python/test/azure/mock_api_tests/test_azure_arm_operationtemplates.py new file mode 100644 index 00000000000..4a2ca1309b5 --- /dev/null +++ b/packages/typespec-python/test/azure/mock_api_tests/test_azure_arm_operationtemplates.py @@ -0,0 +1,80 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.operationtemplates import OperationTemplatesClient +from azure.resourcemanager.operationtemplates import models + +SUBSCRIPTION_ID = "00000000-0000-0000-0000-000000000000" +RESOURCE_GROUP_NAME = "test-rg" + + +@pytest.fixture +def client(credential, authentication_policy): + with OperationTemplatesClient( + credential, + SUBSCRIPTION_ID, + "http://localhost:3000", + authentication_policy=authentication_policy, + ) as client: + yield client + + +def test_check_name_availability_check_global(client): + result = client.check_name_availability.check_global( + body=models.CheckNameAvailabilityRequest(name="checkName", type="Microsoft.Web/site") + ) + assert result.name_available == False + assert result.reason == models.CheckNameAvailabilityReason.ALREADY_EXISTS + assert result.message == "Hostname 'checkName' already exists. Please select a different name." + + +def test_check_name_availability_check_local(client): + result = client.check_name_availability.check_local( + location="westus", + body=models.CheckNameAvailabilityRequest(name="checkName", type="Microsoft.Web/site"), + ) + assert result.name_available == False + assert result.reason == models.CheckNameAvailabilityReason.ALREADY_EXISTS + assert result.message == "Hostname 'checkName' already exists. Please select a different name." + + +def test_operations_list(client): + result = client.operations.list() + assert result + + +def test_lro_begin_create_or_replace(client): + result = client.lro.begin_create_or_replace( + resource_group_name=RESOURCE_GROUP_NAME, + order_name="order1", + resource=models.Order( + location="eastus", + properties=models.OrderProperties(product_id="product1", amount=1), + ), + ).result() + assert result.name == "order1" + assert ( + result.id + == "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.OperationTemplates/orders/order1" + ) + assert result.type == "Azure.ResourceManager.Resources/orders" + assert result.location == "eastus" + assert result.system_data.created_by == "AzureSDK" + + +def test_lro_begin_export(client): + client.lro.begin_export( + resource_group_name=RESOURCE_GROUP_NAME, + order_name="order1", + body=models.ExportRequest(format="csv"), + ).result() + + +def test_lro_begin_delete(client): + client.lro.begin_delete( + resource_group_name=RESOURCE_GROUP_NAME, + order_name="order1", + ).result() diff --git a/packages/typespec-python/test/azure/mock_api_tests/test_azure_arm_resource.py b/packages/typespec-python/test/azure/mock_api_tests/test_azure_arm_resource.py index ecc550477ec..c34d9a85aee 100644 --- a/packages/typespec-python/test/azure/mock_api_tests/test_azure_arm_resource.py +++ b/packages/typespec-python/test/azure/mock_api_tests/test_azure_arm_resource.py @@ -14,7 +14,10 @@ @pytest.fixture def client(credential, authentication_policy): with ResourcesClient( - credential, SUBSCRIPTION_ID, "http://localhost:3000", authentication_policy=authentication_policy + credential, + SUBSCRIPTION_ID, + "http://localhost:3000", + authentication_policy=authentication_policy, ) as client: yield client @@ -22,7 +25,10 @@ def client(credential, authentication_policy): def test_client_signature(credential, authentication_policy): # make sure signautre order is correct client1 = ResourcesClient( - credential, SUBSCRIPTION_ID, "http://localhost:3000", authentication_policy=authentication_policy + credential, + SUBSCRIPTION_ID, + "http://localhost:3000", + authentication_policy=authentication_policy, ) # make sure signautre name is correct client2 = ResourcesClient( @@ -35,7 +41,10 @@ def test_client_signature(credential, authentication_policy): # make sure signautre order is correct client.top_level.get(RESOURCE_GROUP_NAME, "top") # make sure signautre name is correct - client.top_level.get(resource_group_name=RESOURCE_GROUP_NAME, top_level_tracked_resource_name="top") + client.top_level.get( + resource_group_name=RESOURCE_GROUP_NAME, + top_level_tracked_resource_name="top", + ) def test_top_level_begin_create_or_replace(client): @@ -250,3 +259,178 @@ def test_singleton_list_by_resource_group(client): assert result.name == "default" assert result.type == "Azure.ResourceManager.Resources/singletonTrackedResources" assert result.system_data.created_by == "AzureSDK" + + +@pytest.mark.parametrize( + "scope", + [ + "", + "/subscriptions/00000000-0000-0000-0000-000000000000", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Resources/topLevelTrackedResources/top", + ], +) +def test_extensions_resources_begin_create_or_update(client, scope): + result = client.extensions_resources.begin_create_or_update( + resource_uri=scope, + extensions_resource_name="extension", + resource=models.ExtensionsResource(properties=models.ExtensionsResourceProperties(description="valid")), + ).result() + assert result.id == f"{scope}/providers/Azure.ResourceManager.Resources/extensionsResources/extension" + assert result.name == "extension" + assert result.type == "Azure.ResourceManager.Resources/extensionsResources" + assert result.properties.description == "valid" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" + + +@pytest.mark.parametrize( + "scope", + [ + "", + "/subscriptions/00000000-0000-0000-0000-000000000000", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Resources/topLevelTrackedResources/top", + ], +) +def test_extensions_resources_update(client, scope): + result = client.extensions_resources.update( + resource_uri=scope, + extensions_resource_name="extension", + properties=models.ExtensionsResource(properties=models.ExtensionsResourceProperties(description="valid2")), + ) + assert result.id == f"{scope}/providers/Azure.ResourceManager.Resources/extensionsResources/extension" + assert result.name == "extension" + assert result.type == "Azure.ResourceManager.Resources/extensionsResources" + assert result.properties.description == "valid2" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" + + +@pytest.mark.parametrize( + "scope", + [ + "", + "/subscriptions/00000000-0000-0000-0000-000000000000", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Resources/topLevelTrackedResources/top", + ], +) +def test_extensions_resources_get(client, scope): + result = client.extensions_resources.get(resource_uri=scope, extensions_resource_name="extension") + assert result.id == f"{scope}/providers/Azure.ResourceManager.Resources/extensionsResources/extension" + assert result.name == "extension" + assert result.type == "Azure.ResourceManager.Resources/extensionsResources" + assert result.properties.description == "valid" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" + + +@pytest.mark.parametrize( + "scope", + [ + "", + "/subscriptions/00000000-0000-0000-0000-000000000000", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Resources/topLevelTrackedResources/top", + ], +) +def test_extensions_resources_list(client, scope): + response = client.extensions_resources.list_by_scope( + resource_uri=scope, + ) + result = [r for r in response] + for result in result: + assert result.id == f"{scope}/providers/Azure.ResourceManager.Resources/extensionsResources/extension" + assert result.name == "extension" + assert result.type == "Azure.ResourceManager.Resources/extensionsResources" + assert result.properties.description == "valid" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" + + +@pytest.mark.parametrize( + "scope", + [ + "", + "/subscriptions/00000000-0000-0000-0000-000000000000", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Resources/topLevelTrackedResources/top", + ], +) +def test_extensions_resources_delete(client, scope): + client.extensions_resources.delete(resource_uri=scope, extensions_resource_name="extension") + + +def test_location_resources_create_or_update(client): + result = client.location_resources.create_or_update( + location="eastus", + location_resource_name="resource", + resource=models.LocationResource(properties=models.LocationResourceProperties(description="valid")), + ) + assert ( + result.id + == "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource" + ) + assert result.name == "resource" + assert result.type == "Azure.ResourceManager.Resources/locationResources" + assert result.properties.description == "valid" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" + + +def test_location_resources_update(client): + result = client.location_resources.update( + location="eastus", + location_resource_name="resource", + properties=models.LocationResource(properties=models.LocationResourceProperties(description="valid2")), + ) + assert ( + result.id + == "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource" + ) + assert result.name == "resource" + assert result.type == "Azure.ResourceManager.Resources/locationResources" + assert result.properties.description == "valid2" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" + + +def test_location_resources_get(client): + result = client.location_resources.get( + location="eastus", + location_resource_name="resource", + ) + assert ( + result.id + == "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource" + ) + assert result.name == "resource" + assert result.type == "Azure.ResourceManager.Resources/locationResources" + assert result.properties.description == "valid" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" + + +def test_location_resources_delete(client): + client.location_resources.delete( + location="eastus", + location_resource_name="resource", + ) + + +def test_location_resources_list_by_location(client): + response = client.location_resources.list_by_location( + location="eastus", + ) + result = [r for r in response] + for result in result: + assert ( + result.id + == "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource" + ) + assert result.name == "resource" + assert result.type == "Azure.ResourceManager.Resources/locationResources" + assert result.properties.description == "valid" + assert result.properties.provisioning_state == "Succeeded" + assert result.system_data.created_by == "AzureSDK" diff --git a/packages/typespec-python/test/azure/requirements.txt b/packages/typespec-python/test/azure/requirements.txt index 5f834f72a91..3e0ceececf2 100644 --- a/packages/typespec-python/test/azure/requirements.txt +++ b/packages/typespec-python/test/azure/requirements.txt @@ -18,6 +18,7 @@ azure-mgmt-core==1.3.2 -e ./generated/azure-special-headers-client-request-id/ -e ./generated/azure-example-basic -e ./generated/azure-resource-manager-common-properties +-e ./generated/azure-resource-manager-operation-templates -e ./generated/azure-resource-manager-resources -e ./generated/azure-payload-pageable -e ./generated/client-naming From bd8385c680237b12d98f5b1038892a1854757190 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Tue, 11 Feb 2025 11:38:01 -0500 Subject: [PATCH 2/2] add changeset --- .chronus/changes/add-testcases-2025-1-11-11-37-49.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .chronus/changes/add-testcases-2025-1-11-11-37-49.md diff --git a/.chronus/changes/add-testcases-2025-1-11-11-37-49.md b/.chronus/changes/add-testcases-2025-1-11-11-37-49.md new file mode 100644 index 00000000000..a1d4de7ddb2 --- /dev/null +++ b/.chronus/changes/add-testcases-2025-1-11-11-37-49.md @@ -0,0 +1,7 @@ +--- +changeKind: internal +packages: + - "@azure-tools/typespec-python" +--- + +add testcases for latest spector scenarios \ No newline at end of file