From 45337a17195a6b13baa344767d3194398f01dc70 Mon Sep 17 00:00:00 2001 From: iscai-msft <43154838+iscai-msft@users.noreply.github.com> Date: Tue, 7 May 2024 15:03:20 -0400 Subject: [PATCH] add spread flaot tests to dict (#2576) --- .../test_typetest_property_additionalproperties_async.py | 7 +++++++ .../test_typetest_property_additionalproperties.py | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/packages/typespec-python/test/generic_mock_api_tests/asynctests/test_typetest_property_additionalproperties_async.py b/packages/typespec-python/test/generic_mock_api_tests/asynctests/test_typetest_property_additionalproperties_async.py index 3967a2fadc..3159b69164 100644 --- a/packages/typespec-python/test/generic_mock_api_tests/asynctests/test_typetest_property_additionalproperties_async.py +++ b/packages/typespec-python/test/generic_mock_api_tests/asynctests/test_typetest_property_additionalproperties_async.py @@ -343,3 +343,10 @@ async def test_spread_string(client: AdditionalPropertiesClient): body = {"name": "SpreadSpringRecord", "prop": "abc"} assert await client.spread_string.get() == body await client.spread_string.put(body) + + +@pytest.mark.asyncio +async def test_spread_float(client: AdditionalPropertiesClient): + body = {"id": 43.125, "prop": 43.125} + assert await client.spread_float.get() == body + await client.spread_float.put(body) diff --git a/packages/typespec-python/test/generic_mock_api_tests/test_typetest_property_additionalproperties.py b/packages/typespec-python/test/generic_mock_api_tests/test_typetest_property_additionalproperties.py index 31edad2f8d..6fb23f1e52 100644 --- a/packages/typespec-python/test/generic_mock_api_tests/test_typetest_property_additionalproperties.py +++ b/packages/typespec-python/test/generic_mock_api_tests/test_typetest_property_additionalproperties.py @@ -305,3 +305,9 @@ def test_spread_string(client: AdditionalPropertiesClient): body = {"name": "SpreadSpringRecord", "prop": "abc"} assert client.spread_string.get() == body client.spread_string.put(body) + + +def test_spread_float(client: AdditionalPropertiesClient): + body = {"id": 43.125, "prop": 43.125} + assert client.spread_float.get() == body + client.spread_float.put(body)