Use right functions for fixtures in Freebox test (#103135)

This commit is contained in:
Joost Lekkerkerker 2023-10-31 17:25:08 +01:00 committed by GitHub
parent f55cd17982
commit d75a6a3b4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"
)