Adds test case
@@ -35,6 +35,22 @@ def test_decorator_leaves_snake_case_kwargs_unchanged():
)
+def test_decorator_converts_objects_in_lists_to_camel_case():
+ @convert_kwargs_to_snake_case
+ def my_func(*_, **kwargs):
+ assert kwargs == {
+ "first_parameter": True,
+ "list_of_items": [
+ {"first_property": 1, "second_property": 2},
+ ],
+ }
+
+ my_func(
+ firstParameter=True,
+ listOfItems=[{"firstProperty": 1, "secondProperty": 2}],
+ )
+
+
@pytest.mark.asyncio
async def test_decorator_converts_kwargs_to_camel_case_for_async_resolver():
@convert_kwargs_to_snake_case
