Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.

Commit e956d18

Browse files
AutoPrFromHttpClientPythonAutoPrFromHttpClientPython
authored andcommitted
Sync shared files from typespec repo (2026-05-11 09:49:12)
1 parent 9fbebb9 commit e956d18

6 files changed

Lines changed: 21 additions & 23 deletions

packages/typespec-python/tests/mock_api/azure/asynctests/test_azure_client_generator_core_client_default_value_async.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,15 @@ async def client():
1515
yield client
1616

1717

18-
# will reopen after bug fixed
19-
# @pytest.mark.asyncio
20-
# async def test_put_model_property(client: ClientDefaultValueClient):
21-
# """Test case 1: @clientDefaultValue for model property."""
22-
# body = ModelWithDefaultValues(name="test")
23-
# result = await client.put_model_property(body=body)
24-
# assert result.name == "test"
25-
# assert result.timeout == 30
26-
# assert result.tier == "standard"
27-
# assert result.retry is True
18+
@pytest.mark.asyncio
19+
async def test_put_model_property(client: ClientDefaultValueClient):
20+
"""Test case 1: @clientDefaultValue for model property."""
21+
body = ModelWithDefaultValues(name="test")
22+
result = await client.put_model_property(body=body)
23+
assert result.name == "test"
24+
assert result.timeout == 30
25+
assert result.tier == "standard"
26+
assert result.retry is True
2827

2928

3029
@pytest.mark.asyncio

packages/typespec-python/tests/mock_api/azure/test_azure_client_generator_core_client_default_value.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ def client():
1414
yield client
1515

1616

17-
# will reopen after bug fixed
18-
# def test_put_model_property(client: ClientDefaultValueClient):
19-
# """Test case 1: @clientDefaultValue for model property."""
20-
# body = ModelWithDefaultValues(name="test")
21-
# result = client.put_model_property(body=body)
22-
# assert result.name == "test"
23-
# assert result.timeout == 30
24-
# assert result.tier == "standard"
25-
# assert result.retry is True
17+
def test_put_model_property(client: ClientDefaultValueClient):
18+
"""Test case 1: @clientDefaultValue for model property."""
19+
body = ModelWithDefaultValues(name="test")
20+
result = client.put_model_property(body=body)
21+
assert result.name == "test"
22+
assert result.timeout == 30
23+
assert result.tier == "standard"
24+
assert result.retry is True
2625

2726

2827
def test_get_operation_parameter(client: ClientDefaultValueClient):

packages/typespec-python/tests/mock_api/shared/test_generation_subdir2_for_generated_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ def test_v2(client: AddedClient):
3030
def test_interface_v2(client: AddedClient):
3131
assert client.interface_v2.v2_in_interface(
3232
ModelV2(prop="foo", enum_prop=EnumV2.ENUM_MEMBER, union_prop="bar")
33-
) == ModelV2(prop="foo", enum_prop=EnumV2.ENUM_MEMBER, union_prop="bar")
33+
) == ModelV2(prop="foo", enum_prop=EnumV2.ENUM_MEMBER, union_prop="bar")

packages/typespec-python/tests/mock_api/shared/test_generation_subdir_for_generated_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ def test_custom_method():
1414
"level": 0,
1515
"extension": [{"level": 1, "extension": [{"level": 2}]}, {"level": 1}],
1616
}
17-
)
17+
)

packages/typespec-python/tests/mock_api/shared/test_patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ def test_patch_mixin_operation_group_in_operations_folder(key_credential):
99
from authentication.apikey import ApiKeyClient, aio
1010

1111
assert hasattr(ApiKeyClient(key_credential), "patch_added_operation")
12-
assert hasattr(aio.ApiKeyClient(key_credential), "patch_added_operation")
12+
assert hasattr(aio.ApiKeyClient(key_credential), "patch_added_operation")

packages/typespec-python/tests/mock_api/shared/unittests/test_parse_pyproject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ def test_azure_sdk_build():
9292
), f"[tool.azure-sdk-build] section does not contain 'pyright' setting in {package_path}"
9393
assert (
9494
azure_sdk_build["pyright"] is False
95-
), f"Expected pyright = false, but got pyright = {azure_sdk_build['pyright']} in {package_path}"
95+
), f"Expected pyright = false, but got pyright = {azure_sdk_build['pyright']} in {package_path}"

0 commit comments

Comments
 (0)