Skip to content

Commit f9f60dd

Browse files
committed
Correct dataclass use
1 parent fc67269 commit f9f60dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_smile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _write_json(self, call, data):
5353
with open(datafile, "w", encoding="utf-8") as fixture_file:
5454
fixture_file.write(
5555
json.dumps(
56-
dataclasses.asdict(data),
56+
data,
5757
indent=2,
5858
default=lambda x: list(x) if isinstance(x, set) else x,
5959
)
@@ -388,7 +388,7 @@ async def device_test(self, smile=pw_smile.Smile, testdata=None):
388388
if "heater_id" in extra:
389389
self.cooling_present = extra["cooling_present"]
390390
self.notifications = extra["notifications"]
391-
self._write_json("all_data", data)
391+
self._write_json("all_data", dataclasses.asdict(data))
392392
self._write_json("notifications", extra["notifications"])
393393

394394
location_list = smile._thermo_locs

0 commit comments

Comments
 (0)