Send empty dictionary instead of null for iot queries (#1145)

This commit is contained in:
Steven B.
2024-10-01 12:47:36 +01:00
committed by GitHub
parent db80c383a9
commit 81e2685605
5 changed files with 8 additions and 7 deletions

View File

@@ -285,7 +285,7 @@ async def get_legacy_fixture(device):
try:
click.echo(f"Testing {test_call}..", nl=False)
info = await device.protocol.query(
{test_call.module: {test_call.method: None}}
{test_call.module: {test_call.method: {}}}
)
resp = info[test_call.module]
except Exception as ex:
@@ -302,7 +302,7 @@ async def get_legacy_fixture(device):
final_query = defaultdict(defaultdict)
final = defaultdict(defaultdict)
for succ, resp in successes:
final_query[succ.module][succ.method] = None
final_query[succ.module][succ.method] = {}
final[succ.module][succ.method] = resp
final = default_to_regular(final)