feat: Обновить модель HWIDUserResponseDtoList, изменив поле response на devices

This commit is contained in:
Artem 2025-06-18 04:05:28 +02:00
parent 63d9980a8d
commit 641d70a495
No known key found for this signature in database
GPG key ID: 833485276B7902CE
2 changed files with 5 additions and 4 deletions

View file

@ -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

View file

@ -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)