diff --git a/remnawave_api/models/hwid.py b/remnawave_api/models/hwid.py index 1c49004..b079f17 100644 --- a/remnawave_api/models/hwid.py +++ b/remnawave_api/models/hwid.py @@ -22,7 +22,8 @@ class HWIDUserResponseDto(BaseModel): updated_at: str = Field(alias="updatedAt") class HWIDUserResponseDtoList(BaseModel): - response: List[HWIDUserResponseDto] + devices: List[HWIDUserResponseDto] + total: float class HWIDDeleteRequest(BaseModel): hwid: str diff --git a/tests/test_hwid.py b/tests/test_hwid.py index b3c4aa5..da7d540 100644 --- a/tests/test_hwid.py +++ b/tests/test_hwid.py @@ -17,7 +17,7 @@ new_hwid = str(uuid.uuid4()) async def test_get_hwid_user(remnawave): hwid = await remnawave.hwid.get_hwid_user(uuid=REMNAWAVE_USER_UUID) assert isinstance(hwid, HWIDUserResponseDtoList) - assert hwid.response is not None + assert hwid.devices is not None @pytest.mark.asyncio @@ -32,7 +32,7 @@ async def test_add_hwid_to_user(remnawave): ) response = await remnawave.hwid.add_hwid_to_users(body=create_request) assert isinstance(response, HWIDUserResponseDtoList) - assert any(item.hwid == new_hwid for item in response.response) + assert any(item.hwid == new_hwid for item in response.devices) @pytest.mark.asyncio @@ -43,4 +43,4 @@ async def test_delete_hwid_user(remnawave): ) response = await remnawave.hwid.delete_hwid_to_user(body=delete_request) assert isinstance(response, HWIDUserResponseDtoList) - assert not any(item.hwid == new_hwid for item in response.response) + assert not any(item.hwid == new_hwid for item in response.devices)