File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ def homeassistant(self) -> HomeAssistantClient:
4343 """Get Home Assistant component client."""
4444 return self ._homeassistant
4545
46+ @property
4647 def os (self ) -> OSClient :
4748 """Get OS component client."""
4849 return self ._os
Original file line number Diff line number Diff line change 33from pathlib import PurePath
44
55from aioresponses import aioresponses
6+ import pytest
67from yarl import URL
78
89from aiohasupervisor import SupervisorClient
910from aiohasupervisor .models import (
1011 BootSlotName ,
1112 GreenOptions ,
1213 MigrateDataOptions ,
14+ OSUpdate ,
1315 SetBootSlotOptions ,
1416 YellowOptions ,
1517)
@@ -37,12 +39,15 @@ async def test_os_info(
3739 assert info .boot_slots ["B" ].version == "13.0"
3840
3941
42+ @pytest .mark .parametrize ("options" , [None , OSUpdate (version = "13.0" )])
4043async def test_os_update (
41- responses : aioresponses , supervisor_client : SupervisorClient
44+ responses : aioresponses ,
45+ supervisor_client : SupervisorClient ,
46+ options : OSUpdate | None ,
4247) -> None :
4348 """Test OS update API."""
4449 responses .post (f"{ SUPERVISOR_URL } /os/update" , status = 200 )
45- assert await supervisor_client .os .update () is None
50+ assert await supervisor_client .os .update (options ) is None
4651 assert responses .requests .keys () == {("POST" , URL (f"{ SUPERVISOR_URL } /os/update" ))}
4752
4853
You can’t perform that action at this time.
0 commit comments