1+ import os
2+ from os .path import dirname
13from unittest import TestCase
24import pytest
35import src .superannotate as sa
@@ -9,6 +11,7 @@ class TestCloneProject(TestCase):
911 PROJECT_DESCRIPTION = "desc"
1012 PROJECT_TYPE = "Vector"
1113 IMAGE_QUALITY = "original"
14+ PATH_TO_URLS = "data_set/attach_urls.csv"
1215
1316 def setUp (self , * args , ** kwargs ):
1417 self .tearDown ()
@@ -21,6 +24,11 @@ def tearDown(self) -> None:
2124 sa .delete_project (self .PROJECT_NAME_2 )
2225
2326 def test_create_like_project (self ):
27+ _ , _ , _ = sa .attach_image_urls_to_project (
28+ self .PROJECT_NAME_1 ,
29+ os .path .join (dirname (dirname (__file__ )), self .PATH_TO_URLS ),
30+ )
31+
2432 sa .create_annotation_class (
2533 self .PROJECT_NAME_1 ,
2634 "rrr" ,
@@ -68,6 +76,8 @@ def test_create_like_project(self):
6876 new_project = sa .clone_project (
6977 self .PROJECT_NAME_2 , self .PROJECT_NAME_1 , copy_contributors = True
7078 )
79+ source_project = sa .get_project_metadata (self .PROJECT_NAME_1 )
80+ self .assertEqual (new_project ['upload_state' ], source_project ['upload_state' ])
7181
7282 new_settings = sa .get_project_settings (self .PROJECT_NAME_2 )
7383 image_quality = None
0 commit comments