style: apply black and isort formatting across entire codebase

- Standardize quote style (single to double quotes)
- Reorder and group imports alphabetically
- Fix line breaks and indentation for consistency
- Apply PEP 8 formatting standards

Also updated Makefile to exclude both venv and .venv from code quality checks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-28 19:30:17 +01:00
parent 13f0094743
commit 21c13ca39b
236 changed files with 8450 additions and 6545 deletions

View File

@@ -11,7 +11,8 @@ class TestInputValidation:
malicious_search = "'; DROP TABLE products; --"
response = client.get(
f"/api/v1/marketplace/product?search={malicious_search}", headers=auth_headers
f"/api/v1/marketplace/product?search={malicious_search}",
headers=auth_headers,
)
# Should not crash and should return normal response
@@ -40,17 +41,23 @@ class TestInputValidation:
def test_parameter_validation(self, client, auth_headers):
"""Test parameter validation for API endpoints"""
# Test invalid pagination parameters
response = client.get("/api/v1/marketplace/product?limit=-1", headers=auth_headers)
response = client.get(
"/api/v1/marketplace/product?limit=-1", headers=auth_headers
)
assert response.status_code == 422 # Validation error
response = client.get("/api/v1/marketplace/product?skip=-1", headers=auth_headers)
response = client.get(
"/api/v1/marketplace/product?skip=-1", headers=auth_headers
)
assert response.status_code == 422 # Validation error
def test_json_validation(self, client, auth_headers):
"""Test JSON validation for POST requests"""
# Test invalid JSON structure
response = client.post(
"/api/v1/marketplace/product", headers=auth_headers, content="invalid json content"
"/api/v1/marketplace/product",
headers=auth_headers,
content="invalid json content",
)
assert response.status_code == 422 # JSON decode error
@@ -58,6 +65,8 @@ class TestInputValidation:
response = client.post(
"/api/v1/marketplace/product",
headers=auth_headers,
json={"title": "Test MarketplaceProduct"}, # Missing required marketplace_product_id
json={
"title": "Test MarketplaceProduct"
}, # Missing required marketplace_product_id
)
assert response.status_code == 422 # Validation error