From fe04a90059d56450eb328666c22a0d8de0998be8 Mon Sep 17 00:00:00 2001 From: Narek Mkhitaryan Date: Mon, 19 May 2025 18:23:46 +0400 Subject: [PATCH] fix upload_annotations --- src/superannotate/lib/core/usecases/annotations.py | 2 +- tests/integration/annotations/test_upload_annotations.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/superannotate/lib/core/usecases/annotations.py b/src/superannotate/lib/core/usecases/annotations.py index 950c510a..67daff6d 100644 --- a/src/superannotate/lib/core/usecases/annotations.py +++ b/src/superannotate/lib/core/usecases/annotations.py @@ -287,7 +287,7 @@ def _validate_json(self, json_data: dict) -> list: use_case = ValidateAnnotationUseCase( reporter=self.reporter, team_id=self._project.team_id, - project_type=self._project.type, + project_type=self._project.type.value, annotation=json_data, service_provider=self._service_provider, ) diff --git a/tests/integration/annotations/test_upload_annotations.py b/tests/integration/annotations/test_upload_annotations.py index 051c3c3d..dd442a8e 100644 --- a/tests/integration/annotations/test_upload_annotations.py +++ b/tests/integration/annotations/test_upload_annotations.py @@ -267,6 +267,5 @@ def test_download_annotations(self): assert len(downloaded_data) == len( annotations ), "Mismatch in annotation count" - assert ( - downloaded_data == annotations - ), "Downloaded annotations do not match uploaded annotations" + for a in downloaded_data: + assert a in annotations, "Mismatch in annotation count"