QC check
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user