Skip to content

Commit 586dcb9

Browse files
committed
Covert data to json
1 parent abca523 commit 586dcb9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_smile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# pylint: disable=protected-access
22
"""Test Plugwise Home Assistant module and generate test JSON fixtures."""
33
import asyncio
4+
import dataclasses
45
import importlib
56
import json
67

@@ -52,7 +53,7 @@ def _write_json(self, call, data):
5253
with open(datafile, "w", encoding="utf-8") as fixture_file:
5354
fixture_file.write(
5455
json.dumps(
55-
data,
56+
dataclasses.asdict(data),
5657
indent=2,
5758
default=lambda x: list(x) if isinstance(x, set) else x,
5859
)

0 commit comments

Comments
 (0)