Add independent Home Assistant addon
This commit is contained in:
21
tests/test_addon_config.py
Normal file
21
tests/test_addon_config.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import yaml # type: ignore[import-untyped]
|
||||
|
||||
|
||||
def test_addon_config_declares_future_addon() -> None:
|
||||
config = yaml.safe_load(Path("addon/config.yaml").read_text(encoding="utf-8"))
|
||||
|
||||
assert config["slug"] == "sillyhome_future"
|
||||
assert config["version"] == "2.0.0-alpha.2"
|
||||
assert config["ingress"] is True
|
||||
assert config["ingress_port"] == 8099
|
||||
assert config["homeassistant_api"] is True
|
||||
|
||||
|
||||
def test_repository_points_to_gitea_repo() -> None:
|
||||
repository = yaml.safe_load(Path("repository.yaml").read_text(encoding="utf-8"))
|
||||
|
||||
assert repository["url"] == "http://192.168.6.31:3000/Otto/sillyhome-future"
|
||||
Reference in New Issue
Block a user