Skip to content

Commit

Permalink
chore: Adapt test
Browse files Browse the repository at this point in the history
  • Loading branch information
frascuchon committed Sep 19, 2024
1 parent 61309c6 commit 443b631
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions argilla/tests/unit/test_resources/test_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import pytest

from argilla import UserResponse, Response, Dataset, Workspace
from argilla import UserResponse, Response, Dataset, Workspace, Record
from argilla._models import UserResponseModel, ResponseStatus


Expand Down Expand Up @@ -89,9 +89,14 @@ def test_create_user_response_with_multiple_user_id(self):

def test_create_user_response_from_draft_response_model_without_values(self):
model = UserResponseModel(values={}, status=ResponseStatus.draft, user=uuid.uuid4())
response = UserResponse.from_model(
model=model, dataset=Dataset(name="burr", workspace=Workspace(name="test", id=uuid.uuid4()))

record = Record(
fields={"question": "answer"},
_dataset=Dataset(name="burr", workspace=Workspace(name="test", id=uuid.uuid4())),
)

response = UserResponse.from_model(model=model, record=record)

assert len(response.responses) == 0
assert response.user_id is None
assert response.status == ResponseStatus.draft

0 comments on commit 443b631

Please sign in to comment.