From d75a6a3b4b2b0ec34a04de866d007eede2adc9b1 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 31 Oct 2023 17:25:08 +0100 Subject: [PATCH] Use right functions for fixtures in Freebox test (#103135) --- tests/components/freebox/const.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tests/components/freebox/const.py b/tests/components/freebox/const.py index c2951edf8bb..a7dd3132719 100644 --- a/tests/components/freebox/const.py +++ b/tests/components/freebox/const.py @@ -1,43 +1,42 @@ """Test constants.""" -from homeassistant.components.freebox.const import DOMAIN -from tests.common import load_json_object_fixture +from tests.common import load_json_array_fixture, load_json_object_fixture MOCK_HOST = "myrouter.freeboxos.fr" MOCK_PORT = 1234 # router -DATA_SYSTEM_GET_CONFIG = load_json_object_fixture("system_get_config.json", DOMAIN) +DATA_SYSTEM_GET_CONFIG = load_json_object_fixture("freebox/system_get_config.json") # sensors DATA_CONNECTION_GET_STATUS = load_json_object_fixture( - "connection_get_status.json", DOMAIN + "freebox/connection_get_status.json" ) -DATA_CALL_GET_CALLS_LOG = load_json_object_fixture("call_get_calls_log.json", DOMAIN) +DATA_CALL_GET_CALLS_LOG = load_json_array_fixture("freebox/call_get_calls_log.json") -DATA_STORAGE_GET_DISKS = load_json_object_fixture("storage_get_disks.json", DOMAIN) +DATA_STORAGE_GET_DISKS = load_json_array_fixture("freebox/storage_get_disks.json") -DATA_STORAGE_GET_RAIDS = load_json_object_fixture("storage_get_raids.json", DOMAIN) +DATA_STORAGE_GET_RAIDS = load_json_array_fixture("freebox/storage_get_raids.json") # switch -WIFI_GET_GLOBAL_CONFIG = load_json_object_fixture("wifi_get_global_config.json", DOMAIN) +WIFI_GET_GLOBAL_CONFIG = load_json_object_fixture("freebox/wifi_get_global_config.json") # device_tracker -DATA_LAN_GET_HOSTS_LIST = load_json_object_fixture("lan_get_hosts_list.json", DOMAIN) +DATA_LAN_GET_HOSTS_LIST = load_json_array_fixture("freebox/lan_get_hosts_list.json") # Home # ALL -DATA_HOME_GET_NODES = load_json_object_fixture("home_get_nodes.json", DOMAIN) +DATA_HOME_GET_NODES = load_json_array_fixture("freebox/home_get_nodes.json") # Home # PIR node id 26, endpoint id 6 -DATA_HOME_PIR_GET_VALUES = load_json_object_fixture("home_pir_get_values.json", DOMAIN) +DATA_HOME_PIR_GET_VALUES = load_json_object_fixture("freebox/home_pir_get_values.json") # Home # ALARM node id 7, endpoint id 11 DATA_HOME_ALARM_GET_VALUES = load_json_object_fixture( - "home_alarm_get_values.json", DOMAIN + "freebox/home_alarm_get_values.json" )