Skip to content

Commit 1f8ef1a

Browse files
Add fake testcases (#3296)
* update testcases * changelog * Rename main-2026-0-7-16-58-10.md to main-2026-0-7-16-58-11.md --------- Co-authored-by: Yuchao Yan <[email protected]>
1 parent d0529d8 commit 1f8ef1a

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: internal
3+
packages:
4+
- "@azure-tools/typespec-python"
5+
---
6+
7+
Add testcases for several spector scenarios

packages/typespec-python/test/azure/mock_api_tests/asynctests/test_special_words_async.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,21 @@ async def test_model(client: SpecialWordsClient, special_words):
4040
@pytest.mark.asyncio
4141
async def test_model_properties(client: SpecialWordsClient):
4242
await client.model_properties.same_as_model(models.SameAsModel(same_as_model="ok"))
43+
44+
45+
@pytest.mark.asyncio
46+
async def test_model_properties_dict_methods(client: SpecialWordsClient):
47+
await client.model_properties.dict_methods(
48+
body=models.DictMethods(
49+
keys_property="ok",
50+
items_property="ok",
51+
values_property="ok",
52+
popitem_property="ok",
53+
clear_property="ok",
54+
update_property="ok",
55+
setdefault_property="ok",
56+
pop_property="ok",
57+
get_property="ok",
58+
copy_property="ok",
59+
)
60+
)

packages/typespec-python/test/azure/mock_api_tests/test_special_words.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,20 @@ def test_model(client: SpecialWordsClient, special_words):
3535

3636
def test_model_properties(client: SpecialWordsClient):
3737
client.model_properties.same_as_model(models.SameAsModel(same_as_model="ok"))
38+
39+
40+
def test_model_properties_dict_methods(client: SpecialWordsClient):
41+
client.model_properties.dict_methods(
42+
body=models.DictMethods(
43+
keys_property="ok",
44+
items_property="ok",
45+
values_property="ok",
46+
popitem_property="ok",
47+
clear_property="ok",
48+
update_property="ok",
49+
setdefault_property="ok",
50+
pop_property="ok",
51+
get_property="ok",
52+
copy_property="ok",
53+
)
54+
)

0 commit comments

Comments
 (0)