mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-10 11:29:51 +00:00
Move write of core state to executor (#5720)
This commit is contained in:
@@ -58,7 +58,7 @@ async def api_token_validation(aiohttp_client, coresys: CoreSys) -> TestClient:
|
||||
@pytest.mark.asyncio
|
||||
async def test_api_security_system_initialize(api_system: TestClient, coresys: CoreSys):
|
||||
"""Test security."""
|
||||
coresys.core.state = CoreState.INITIALIZE
|
||||
await coresys.core.set_state(CoreState.INITIALIZE)
|
||||
|
||||
resp = await api_system.get("/supervisor/ping")
|
||||
result = await resp.json()
|
||||
@@ -69,7 +69,7 @@ async def test_api_security_system_initialize(api_system: TestClient, coresys: C
|
||||
@pytest.mark.asyncio
|
||||
async def test_api_security_system_setup(api_system: TestClient, coresys: CoreSys):
|
||||
"""Test security."""
|
||||
coresys.core.state = CoreState.SETUP
|
||||
await coresys.core.set_state(CoreState.SETUP)
|
||||
|
||||
resp = await api_system.get("/supervisor/ping")
|
||||
result = await resp.json()
|
||||
@@ -80,7 +80,7 @@ async def test_api_security_system_setup(api_system: TestClient, coresys: CoreSy
|
||||
@pytest.mark.asyncio
|
||||
async def test_api_security_system_running(api_system: TestClient, coresys: CoreSys):
|
||||
"""Test security."""
|
||||
coresys.core.state = CoreState.RUNNING
|
||||
await coresys.core.set_state(CoreState.RUNNING)
|
||||
|
||||
resp = await api_system.get("/supervisor/ping")
|
||||
assert resp.status == 200
|
||||
@@ -89,7 +89,7 @@ async def test_api_security_system_running(api_system: TestClient, coresys: Core
|
||||
@pytest.mark.asyncio
|
||||
async def test_api_security_system_startup(api_system: TestClient, coresys: CoreSys):
|
||||
"""Test security."""
|
||||
coresys.core.state = CoreState.STARTUP
|
||||
await coresys.core.set_state(CoreState.STARTUP)
|
||||
|
||||
resp = await api_system.get("/supervisor/ping")
|
||||
assert resp.status == 200
|
||||
|
||||
Reference in New Issue
Block a user