Skip to content

Commit 4db4b56

Browse files
author
Leandro Rosemberg
committed
Import responses on test_project_methods
1 parent 1189fd4 commit 4db4b56

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/test_queries.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
from _datetime import datetime
22

3+
import responses
4+
5+
from roboflow import API_URL
6+
from roboflow.config import DEFAULT_BATCH_NAME
37
from roboflow.core.project import Project
48
from roboflow.core.version import Version
59
from roboflow.models.classification import ClassificationModel
610
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
812

913

1014
class TestQueries(RoboflowTest):
@@ -40,6 +44,14 @@ def test_project_fields(self):
4044

4145
@ordered
4246
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+
4355
version_information = self.project.get_version_information()
4456
print_versions = self.project.list_versions()
4557
list_versions = self.project.versions()

0 commit comments

Comments
 (0)