diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7946a926..19553c1b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -24,14 +24,14 @@ repos: - id: trailing-whitespace - repo: https://github.com/PyCQA/bandit - rev: 1.7.9 + rev: 1.8.3 hooks: - id: bandit args: ["-c", "pyproject.toml"] additional_dependencies: ["bandit[toml]"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.4 + rev: v0.9.7 hooks: - id: ruff-format - id: ruff diff --git a/tests/test_project.py b/tests/test_project.py index a7cd55de..3ae12ed2 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -31,7 +31,7 @@ def test_check_valid_image_with_unaccepted_formats(self): def test_upload_raises_upload_image_error(self): responses.add( responses.POST, - f"{API_URL}/dataset/{PROJECT_NAME}/upload?api_key={ROBOFLOW_API_KEY}" f"&batch={DEFAULT_BATCH_NAME}", + f"{API_URL}/dataset/{PROJECT_NAME}/upload?api_key={ROBOFLOW_API_KEY}&batch={DEFAULT_BATCH_NAME}", json={ "error": { "message": "Invalid image.", @@ -57,7 +57,7 @@ def test_upload_raises_upload_annotation_error(self): # Image upload responses.add( responses.POST, - f"{API_URL}/dataset/{PROJECT_NAME}/upload?api_key={ROBOFLOW_API_KEY}" f"&batch={DEFAULT_BATCH_NAME}", + f"{API_URL}/dataset/{PROJECT_NAME}/upload?api_key={ROBOFLOW_API_KEY}&batch={DEFAULT_BATCH_NAME}", json={"success": True, "id": image_id}, status=200, ) @@ -65,7 +65,7 @@ def test_upload_raises_upload_annotation_error(self): # Annotation responses.add( responses.POST, - f"{API_URL}/dataset/{PROJECT_NAME}/annotate/{image_id}?api_key={ROBOFLOW_API_KEY}" f"&name={image_name}", + f"{API_URL}/dataset/{PROJECT_NAME}/annotate/{image_id}?api_key={ROBOFLOW_API_KEY}&name={image_name}", json={ "error": { "message": "Image was already annotated.", diff --git a/tests/test_queries.py b/tests/test_queries.py index c9a26ed0..93c29179 100644 --- a/tests/test_queries.py +++ b/tests/test_queries.py @@ -47,7 +47,7 @@ def test_project_methods(self): # Upload image responses.add( responses.POST, - f"{API_URL}/dataset/{PROJECT_NAME}/upload?api_key={ROBOFLOW_API_KEY}" f"&batch={DEFAULT_BATCH_NAME}", + f"{API_URL}/dataset/{PROJECT_NAME}/upload?api_key={ROBOFLOW_API_KEY}&batch={DEFAULT_BATCH_NAME}", json={"duplicate": True, "id": "hbALkCFdNr9rssgOUXug"}, status=200, )