Skip to content

Commit 015c670

Browse files
committed
Adapt test-code
1 parent 5d22fb9 commit 015c670

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/test_init.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -605,8 +605,8 @@ def test_and_assert(test_dict, data, header):
605605
if initialize:
606606
_LOGGER.info("Asserting testdata:")
607607
if smile.smile_legacy:
608-
await smile.full_update_device()
609-
smile.get_all_device_zones()
608+
await smile.full_xml_update()
609+
smile.get_all_gateway_entities()
610610
data = await smile.async_update()
611611
assert smile._timeout == 30
612612
else:
@@ -621,19 +621,19 @@ def test_and_assert(test_dict, data, header):
621621
self.cooling_present = data.gateway["cooling_present"]
622622
if "notifications" in data.gateway:
623623
self.notifications = data.gateway["notifications"]
624-
self.device_items = data.gateway["item_count"]
624+
self.entity_items = data.gateway["item_count"]
625625

626626
self._cooling_active = False
627627
self._cooling_enabled = False
628628
if "heater_id" in data.gateway:
629-
heat_cooler = data.device_zones[data.gateway["heater_id"]]
629+
heat_cooler = data.entities[data.gateway["heater_id"]]
630630
if "binary_sensors" in heat_cooler:
631631
if "cooling_enabled" in heat_cooler["binary_sensors"]:
632632
self._cooling_enabled = heat_cooler["binary_sensors"]["cooling_enabled"]
633633
if "cooling_state" in heat_cooler["binary_sensors"]:
634634
self._cooling_active = heat_cooler["binary_sensors"]["cooling_state"]
635635

636-
self._write_json("all_data", {"device_zones": data.device_zones, "gateway": data.gateway})
636+
self._write_json("all_data", {"entities": data.entities, "gateway": data.gateway})
637637

638638
if "FIXTURES" in os.environ:
639639
_LOGGER.info("Skipping tests: Requested fixtures only") # pragma: no cover
@@ -645,15 +645,15 @@ def test_and_assert(test_dict, data, header):
645645
_LOGGER.info("Gateway id = %s", data.gateway["gateway_id"])
646646
_LOGGER.info("Hostname = %s", smile.smile_hostname)
647647
_LOGGER.info("Gateway data = %s", data.gateway)
648-
_LOGGER.info("Device_zone list = %s", data.device_zones)
648+
_LOGGER.info("Entities list = %s", data.entities)
649649
self.show_setup(location_list, data.device_zones)
650650

651651
if skip_testing:
652652
return
653653

654654
# Perform tests and asserts in two steps: devices and zones
655655
for header, data_dict in testdata.items():
656-
test_and_assert(data_dict, data.device_zones, header)
656+
test_and_assert(data_dict, data.entities, header)
657657

658658
# pragma warning restore S3776
659659

0 commit comments

Comments
 (0)