File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
1
from _datetime import datetime
2
2
3
+ import responses
4
+
5
+ from roboflow import API_URL
6
+ from roboflow .config import DEFAULT_BATCH_NAME
3
7
from roboflow .core .project import Project
4
8
from roboflow .core .version import Version
5
9
from roboflow .models .classification import ClassificationModel
6
10
from roboflow .models .object_detection import ObjectDetectionModel
7
- from tests import PROJECT_NAME , RoboflowTest , ordered
11
+ from tests import PROJECT_NAME , RoboflowTest , ordered , ROBOFLOW_API_KEY
8
12
9
13
10
14
class TestQueries (RoboflowTest ):
@@ -40,6 +44,14 @@ def test_project_fields(self):
40
44
41
45
@ordered
42
46
def test_project_methods (self ):
47
+ # Upload image
48
+ responses .add (
49
+ responses .POST ,
50
+ f"{ API_URL } /dataset/{ PROJECT_NAME } /upload?api_key={ ROBOFLOW_API_KEY } " f"&batch={ DEFAULT_BATCH_NAME } " ,
51
+ json = {"duplicate" : True , "id" : "hbALkCFdNr9rssgOUXug" },
52
+ status = 200 ,
53
+ )
54
+
43
55
version_information = self .project .get_version_information ()
44
56
print_versions = self .project .list_versions ()
45
57
list_versions = self .project .versions ()
You can’t perform that action at this time.
0 commit comments