This commit is contained in:
2025-09-21 13:00:10 +02:00
parent a26f8086f8
commit c2a1056db7
56 changed files with 339 additions and 104 deletions

View File

@@ -50,9 +50,7 @@ class TestInputValidation:
"""Test JSON validation for POST requests"""
# Test invalid JSON structure
response = client.post(
"/api/v1/product",
headers=auth_headers,
content="invalid json content"
"/api/v1/product", headers=auth_headers, content="invalid json content"
)
assert response.status_code == 422 # JSON decode error
@@ -60,6 +58,6 @@ class TestInputValidation:
response = client.post(
"/api/v1/product",
headers=auth_headers,
json={"title": "Test Product"} # Missing required product_id
json={"title": "Test Product"}, # Missing required product_id
)
assert response.status_code == 422 # Validation error