File tree 3 files changed +50
-3
lines changed
3 files changed +50
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class BackupContent(ResponseData):
35
35
36
36
homeassistant : bool
37
37
addons : list [str ]
38
- folders : list [str ]
38
+ folders : list [Folder ]
39
39
40
40
41
41
@dataclass (frozen = True )
@@ -73,11 +73,11 @@ class BackupAddon(ResponseData):
73
73
class BackupComplete (BackupBaseFields , ResponseData ):
74
74
"""BackupComplete model."""
75
75
76
- supervisor_version : str
76
+ supervisor_version : str | None
77
77
homeassistant : str
78
78
addons : list [BackupAddon ]
79
79
repositories : list [str ]
80
- folders : list [str ]
80
+ folders : list [Folder ]
81
81
homeassistant_exclude_database : bool | None
82
82
83
83
Original file line number Diff line number Diff line change
1
+ {
2
+ "result" : " ok" ,
3
+ "data" : {
4
+ "slug" : " d13dedd0" ,
5
+ "type" : " partial" ,
6
+ "name" : " Studio Code Server" ,
7
+ "date" : " 2023-08-10T19:37:01.084215+00:00" ,
8
+ "size" : 0.12 ,
9
+ "compressed" : true ,
10
+ "protected" : false ,
11
+ "supervisor_version" : " 2023.08.2.dev1002" ,
12
+ "homeassistant" : null ,
13
+ "location" : " Test" ,
14
+ "addons" : [
15
+ {
16
+ "slug" : " a0d7b954_vscode" ,
17
+ "name" : " Studio Code Server" ,
18
+ "version" : " 5.6.1" ,
19
+ "size" : 0.1
20
+ }
21
+ ],
22
+ "repositories" : [
23
+ " local" ,
24
+ " https://github.com/hassio-addons/repository" ,
25
+ " core" ,
26
+ " https://github.com/music-assistant/home-assistant-addon" ,
27
+ " https://github.com/esphome/home-assistant-addon"
28
+ ],
29
+ "folders" : [],
30
+ "homeassistant_exclude_database" : null
31
+ }
32
+ }
Original file line number Diff line number Diff line change @@ -213,6 +213,21 @@ async def test_backup_info(
213
213
assert result .homeassistant_exclude_database is None
214
214
215
215
216
+ async def test_backup_info_no_homeassistant (
217
+ responses : aioresponses , supervisor_client : SupervisorClient
218
+ ) -> None :
219
+ """Test backup info API with no home assistant."""
220
+ responses .get (
221
+ f"{ SUPERVISOR_URL } /backups/d13dedd0/info" ,
222
+ status = 200 ,
223
+ body = load_fixture ("backup_info_no_homeassistant.json" ),
224
+ )
225
+ result = await supervisor_client .backups .backup_info ("d13dedd0" )
226
+ assert result .slug == "d13dedd0"
227
+ assert result .type == "partial"
228
+ assert result .homeassistant is None
229
+
230
+
216
231
async def test_remove_backup (
217
232
responses : aioresponses , supervisor_client : SupervisorClient
218
233
) -> None :
You can’t perform that action at this time.
0 commit comments