Use supervisor envs instead of hassio (#72601)

This commit is contained in:
Joakim Sørensen 2022-05-30 12:00:13 +02:00 committed by GitHub
parent c8f677ce4c
commit 3a0111e65d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 25 additions and 25 deletions

View file

@ -57,7 +57,7 @@ async def mock_supervisor_fixture(hass, aioclient_mock):
"""Mock supervisor."""
aioclient_mock.post("http://127.0.0.1/homeassistant/options", json={"result": "ok"})
aioclient_mock.post("http://127.0.0.1/supervisor/options", json={"result": "ok"})
with patch.dict(os.environ, {"HASSIO": "127.0.0.1"}), patch(
with patch.dict(os.environ, {"SUPERVISOR": "127.0.0.1"}), patch(
"homeassistant.components.hassio.HassIO.is_connected",
return_value=True,
), patch(
@ -79,7 +79,7 @@ async def mock_supervisor_fixture(hass, aioclient_mock):
"homeassistant.components.hassio.HassIO.get_ingress_panels",
return_value={"panels": {}},
), patch.dict(
os.environ, {"HASSIO_TOKEN": "123456"}
os.environ, {"SUPERVISOR_TOKEN": "123456"}
):
yield