Skip to content

Commit 51e6d75

Browse files
committed
fix python common properties tests
1 parent 5fe7a04 commit 51e6d75

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

packages/http-client-python/tests/mock_api/azure/asynctests/test_azure_arm_commonproperties_async.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
ARM_ID_WITH_TYPE = SIMPLE_ARM_ID
1717
ARM_ID_WITH_TYPE_AND_SCOPE = SIMPLE_ARM_ID
1818
ARM_ID_WITH_ALL_SCOPES = f"/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/{RESOURCE_GROUP_NAME}/providers/Microsoft.Compute/virtualMachines/myVm"
19+
ARM_ID_WITH_GROUP_SCOPE = "/providers/Microsoft.Management/serviceGroups/test-sg/providers/Microsoft.Authorization/roleDefinitions/00000000-0000-0000-0000-000000000000"
1920

2021

2122
@pytest_asyncio.fixture
@@ -111,6 +112,7 @@ async def test_arm_resource_identifiers_get(client):
111112
assert result.properties.arm_id_with_type == ARM_ID_WITH_TYPE
112113
assert result.properties.arm_id_with_type_and_scope == ARM_ID_WITH_TYPE_AND_SCOPE
113114
assert result.properties.arm_id_with_all_scopes == ARM_ID_WITH_ALL_SCOPES
115+
assert result.properties.arm_id_with_group_scope == ARM_ID_WITH_GROUP_SCOPE
114116

115117

116118
@pytest.mark.asyncio
@@ -125,6 +127,7 @@ async def test_arm_resource_identifiers_create_or_replace(client):
125127
arm_id_with_type=ARM_ID_WITH_TYPE,
126128
arm_id_with_type_and_scope=ARM_ID_WITH_TYPE_AND_SCOPE,
127129
arm_id_with_all_scopes=ARM_ID_WITH_ALL_SCOPES,
130+
arm_id_with_group_scope=ARM_ID_WITH_GROUP_SCOPE,
128131
),
129132
),
130133
)
@@ -134,3 +137,4 @@ async def test_arm_resource_identifiers_create_or_replace(client):
134137
assert result.properties.arm_id_with_type == ARM_ID_WITH_TYPE
135138
assert result.properties.arm_id_with_type_and_scope == ARM_ID_WITH_TYPE_AND_SCOPE
136139
assert result.properties.arm_id_with_all_scopes == ARM_ID_WITH_ALL_SCOPES
140+
assert result.properties.arm_id_with_group_scope == ARM_ID_WITH_GROUP_SCOPE

packages/http-client-python/tests/mock_api/azure/test_azure_arm_commonproperties.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
ARM_ID_WITH_TYPE = SIMPLE_ARM_ID
1616
ARM_ID_WITH_TYPE_AND_SCOPE = SIMPLE_ARM_ID
1717
ARM_ID_WITH_ALL_SCOPES = f"/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/{RESOURCE_GROUP_NAME}/providers/Microsoft.Compute/virtualMachines/myVm"
18+
ARM_ID_WITH_GROUP_SCOPE = "/providers/Microsoft.Management/serviceGroups/test-sg/providers/Microsoft.Authorization/roleDefinitions/00000000-0000-0000-0000-000000000000"
1819

1920

2021
@pytest.fixture
@@ -104,6 +105,7 @@ def test_arm_resource_identifiers_get(client):
104105
assert result.properties.arm_id_with_type == ARM_ID_WITH_TYPE
105106
assert result.properties.arm_id_with_type_and_scope == ARM_ID_WITH_TYPE_AND_SCOPE
106107
assert result.properties.arm_id_with_all_scopes == ARM_ID_WITH_ALL_SCOPES
108+
assert result.properties.arm_id_with_group_scope == ARM_ID_WITH_GROUP_SCOPE
107109

108110

109111
def test_arm_resource_identifiers_create_or_replace(client):
@@ -117,6 +119,7 @@ def test_arm_resource_identifiers_create_or_replace(client):
117119
arm_id_with_type=ARM_ID_WITH_TYPE,
118120
arm_id_with_type_and_scope=ARM_ID_WITH_TYPE_AND_SCOPE,
119121
arm_id_with_all_scopes=ARM_ID_WITH_ALL_SCOPES,
122+
arm_id_with_group_scope=ARM_ID_WITH_GROUP_SCOPE,
120123
),
121124
),
122125
)
@@ -126,3 +129,4 @@ def test_arm_resource_identifiers_create_or_replace(client):
126129
assert result.properties.arm_id_with_type == ARM_ID_WITH_TYPE
127130
assert result.properties.arm_id_with_type_and_scope == ARM_ID_WITH_TYPE_AND_SCOPE
128131
assert result.properties.arm_id_with_all_scopes == ARM_ID_WITH_ALL_SCOPES
132+
assert result.properties.arm_id_with_group_scope == ARM_ID_WITH_GROUP_SCOPE

0 commit comments

Comments
 (0)