From 6eb4ad7842726152fc3324944dd62516da6ae354 Mon Sep 17 00:00:00 2001 From: Yousif Yassi Date: Tue, 19 Nov 2024 09:18:52 -0500 Subject: [PATCH] adding more tests --- label_studio/tests/sdk/test_annotations.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/label_studio/tests/sdk/test_annotations.py b/label_studio/tests/sdk/test_annotations.py index 17491162db0d..4fb6591b19bc 100644 --- a/label_studio/tests/sdk/test_annotations.py +++ b/label_studio/tests/sdk/test_annotations.py @@ -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, @@ -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): @@ -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])