chore: Projektgeruest, Manifest, Konstanten und CI
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"""The manifest must agree with the constants the code relies on."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from custom_components.ninlight.const import DOMAIN
|
||||
|
||||
MANIFEST = Path(__file__).parents[1] / "custom_components" / "ninlight" / "manifest.json"
|
||||
|
||||
|
||||
def test_manifest_matches_constants() -> None:
|
||||
manifest = json.loads(MANIFEST.read_text(encoding="utf-8"))
|
||||
assert manifest["domain"] == DOMAIN
|
||||
assert manifest["zeroconf"] == [{"type": "_ninlight._tcp.local."}]
|
||||
assert manifest["iot_class"] == "local_polling"
|
||||
assert manifest["config_flow"] is True
|
||||
assert manifest["requirements"] == []
|
||||
assert manifest["dependencies"] == ["http"]
|
||||
Reference in New Issue
Block a user