Skip to content

Commit c7d4fc7

Browse files
committed
Adapt testing
1 parent 6ee7f78 commit c7d4fc7

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

tests/test_init.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -617,17 +617,14 @@ def test_and_assert(test_dict, data, header):
617617
_LOGGER.info("Asserting updated testdata:")
618618
data = await smile.async_update()
619619

620-
self.cooling_present = False
621-
if "cooling_present" in data.gateway:
622-
self.cooling_present = data.gateway["cooling_present"]
623-
if "notifications" in data.gateway:
624-
self.notifications = data.gateway["notifications"]
625-
self.entity_items = data.gateway["item_count"]
620+
self.cooling_present = smile.cooling_present
621+
self.notifications = smile.notifications
622+
self.entity_items = smile.item_count
626623

627624
self._cooling_active = False
628625
self._cooling_enabled = False
629-
if "heater_id" in data.gateway:
630-
heat_cooler = data.devices[data.gateway["heater_id"]]
626+
if smile.heater_id != "None":
627+
heat_cooler = data.devices[smile.heater_id]
631628
if "binary_sensors" in heat_cooler:
632629
if "cooling_enabled" in heat_cooler["binary_sensors"]:
633630
self._cooling_enabled = heat_cooler["binary_sensors"][
@@ -647,7 +644,7 @@ def test_and_assert(test_dict, data, header):
647644
self.entity_list = list(data.devices.keys())
648645
location_list = smile._loc_data
649646

650-
_LOGGER.info("Gateway id = %s", data.gateway["gateway_id"])
647+
_LOGGER.info("Gateway id = %s", smile.gateway_id)
651648
_LOGGER.info("Hostname = %s", smile.smile_hostname)
652649
_LOGGER.info("Gateway data = %s", data.gateway)
653650
_LOGGER.info("Entities list = %s", data.devices)

0 commit comments

Comments
 (0)