1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 20:35:55 +00:00

Clarify message when addon unavailable (#4098)

This commit is contained in:
Mike Degatano
2023-01-12 11:46:40 -05:00
committed by GitHub
parent 089635f4d3
commit fed4a05003
4 changed files with 166 additions and 19 deletions

View File

@@ -8,6 +8,7 @@ from dbus_fast.introspection import Method, Property, Signal
from supervisor.dbus.interface import DBusInterface, DBusInterfaceProxy
from supervisor.utils.dbus import DBUS_INTERFACE_PROPERTIES
from supervisor.utils.yaml import read_yaml_file
def get_dbus_name(intr_list: list[Method | Property | Signal], snake_case: str) -> str:
@@ -71,6 +72,12 @@ def load_json_fixture(filename: str) -> Any:
return json.loads(path.read_text(encoding="utf-8"))
def load_yaml_fixture(filename: str) -> Any:
"""Load a YAML fixture."""
path = Path(Path(__file__).parent.joinpath("fixtures"), filename)
return read_yaml_file(path)
def load_fixture(filename: str) -> str:
"""Load a fixture."""
path = Path(Path(__file__).parent.joinpath("fixtures"), filename)