Skip to content

Commit

Permalink
adding more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yyassi-heartex committed Nov 19, 2024
1 parent 027aa16 commit 6eb4ad7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions label_studio/tests/sdk/test_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def test_annotations_CRUD(django_live_url, business_client):
new_annotation = ls.annotations.create(task_id, result=annotation_data['result'])
assert (annotation_id := new_annotation.id)
assert new_annotation.result == annotation_data['result']
assert new_annotation.result_count == 1

ls.annotations.update(
id=annotation_id,
Expand All @@ -56,6 +57,7 @@ def test_annotations_CRUD(django_live_url, business_client):
assert len(annotations) == 1
assert annotations[0].id == another_annotation.id
assert annotations[0].result[0]['value']['choices'] == ['Neutral']
assert annotations[0].result_count == len(annotations[0].result)


def test_annotation_marks_task_as_labeled(django_live_url, business_client):
Expand Down Expand Up @@ -126,3 +128,4 @@ def test_annotation_marks_task_as_labeled(django_live_url, business_client):
'height': 100,
'rotation': 0,
}
assert labeled_tasks[0].annotations[0]['result_count'] == len(labeled_tasks[0].annotations[0]['result'][0])

0 comments on commit 6eb4ad7

Please sign in to comment.