Skip to content

Commit 7c415dd

Browse files
committed
Field as purepath in model
1 parent 3801091 commit 7c415dd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

aiohasupervisor/models/os.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from dataclasses import dataclass
44
from enum import StrEnum
5+
from pathlib import PurePath
56

67
from .base import Options, Request, ResponseData
78

@@ -72,7 +73,7 @@ class DataDisk(ResponseData):
7273
serial: str
7374
size: int
7475
id: str
75-
dev_path: str
76+
dev_path: PurePath
7677

7778

7879
@dataclass(frozen=True, slots=True)

tests/test_os.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ async def test_os_list_data_disks(
8484
assert datadisks.disks[0].model == "SSK Storage"
8585
assert datadisks.disks[0].serial == "DF123"
8686
assert datadisks.disks[0].name == "SSK SSK Storage (DF123)"
87-
assert datadisks.disks[0].dev_path == "/dev/sda"
87+
assert datadisks.disks[0].dev_path.as_posix() == "/dev/sda"
8888

8989

9090
async def test_os_wipe_data(

0 commit comments

Comments
 (0)