Update to python 3.11 (#4296)

This commit is contained in:
Mike Degatano
2023-05-22 13:12:34 -04:00
committed by GitHub
parent 61a7e6a87d
commit 5ced4e2f3b
18 changed files with 132 additions and 31 deletions

View File

@@ -0,0 +1,20 @@
"""Test Homeassistant module."""
from pathlib import Path
from unittest.mock import patch
from supervisor.coresys import CoreSys
from supervisor.docker.interface import DockerInterface
async def test_load(coresys: CoreSys, tmp_supervisor_data: Path):
"""Test homeassistant module load."""
with open(tmp_supervisor_data / "homeassistant" / "secrets.yaml", "w") as secrets:
secrets.write("hello: world\n")
with patch.object(DockerInterface, "attach") as attach:
await coresys.homeassistant.load()
attach.assert_called_once()
assert coresys.homeassistant.secrets.secrets == {"hello": "world"}