File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -637,13 +637,11 @@ async def execute_action_group(
637637 mode : CommandMode | None = None ,
638638 label : str | None = "python-overkiz-api" ,
639639 ) -> str :
640- """
641- Execute a non-persistent action group
640+ """Execute a non-persistent action group.
642641
643642 The executed action group does not have to be persisted on the server before use.
644643 Per-session rate-limit : 1 calls per 28min 48s period for all operations of the same category (exec)
645644 """
646-
647645 """Send several commands in one call"""
648646
649647 # Build a logical (snake_case) payload using model helpers and convert it
Original file line number Diff line number Diff line change @@ -303,6 +303,7 @@ def test_bad_list_value(self):
303303
304304
305305def test_command_to_payload_omits_none ():
306+ """Command.to_payload omits None fields from the resulting payload."""
306307 from pyoverkiz .enums .command import OverkizCommand
307308 from pyoverkiz .models import Command
308309
@@ -313,6 +314,7 @@ def test_command_to_payload_omits_none():
313314
314315
315316def test_action_to_payload_and_parameters_conversion ():
317+ """Action.to_payload converts nested Command enums to primitives."""
316318 from pyoverkiz .enums .command import OverkizCommand , OverkizCommandParam
317319 from pyoverkiz .models import Action , Command
318320
Original file line number Diff line number Diff line change 1+ """Tests for pyoverkiz.serializers."""
2+
13from __future__ import annotations
24
35from pyoverkiz .serializers import prepare_payload
46
57
68def test_prepare_payload_camelizes_and_fixes_device_url ():
9+ """Test that prepare_payload converts snake_case to camelCase and fixes abbreviations."""
710 payload = {
811 "label" : "test" ,
912 "actions" : [{"device_url" : "rts://1/2" , "commands" : [{"name" : "close" }]}],
@@ -17,6 +20,7 @@ def test_prepare_payload_camelizes_and_fixes_device_url():
1720
1821
1922def test_prepare_payload_nested_lists_and_dicts ():
23+ """Test that prepare_payload handles nested lists and dicts correctly."""
2024 payload = {
2125 "actions" : [
2226 {
You can’t perform that action at this time.
0 commit comments