Skip to content

Commit 9a99b3f

Browse files
committed
Add test empty json upload
1 parent 2e67496 commit 9a99b3f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/integration/annotations/test_video_annotation_upload.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,20 @@ def test_upload_annotations_without_class_name(self):
100100
self.csv_path,
101101
)
102102
sa.upload_annotations_from_folder_to_project(self.PROJECT_NAME, self.annotations_without_classes)
103+
104+
105+
def test_upload_annotations_empty_json(self):
106+
sa.create_annotation_classes_from_classes_json(self.PROJECT_NAME, self.classes_path)
107+
108+
_, _, _ = sa.attach_video_urls_to_project(
109+
self.PROJECT_NAME,
110+
self.csv_path,
111+
)
112+
export = sa.prepare_export(self.PROJECT_NAME)
113+
114+
with tempfile.TemporaryDirectory() as temp_dir:
115+
output_path = temp_dir
116+
sa.download_export(self.PROJECT_NAME, export, output_path, True)
117+
uploaded, _, _ = sa.upload_annotations_from_folder_to_project(self.PROJECT_NAME, output_path)
118+
self.assertEqual(len(uploaded),1)
119+

0 commit comments

Comments
 (0)