Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use right functions for fixtures in Freebox test #103135

Merged
merged 1 commit into from Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 11 additions & 12 deletions 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"
)