Main exception renamed to WizamartException

This commit is contained in:
2025-10-27 21:55:05 +01:00
parent 1e0cbf5927
commit 5c80ba17c5
15 changed files with 126 additions and 179 deletions

View File

@@ -434,14 +434,14 @@ class TestInventoryAPI:
assert data["error_code"] == "VALIDATION_ERROR"
def test_exception_structure_consistency(self, client, auth_headers):
"""Test that all inventory exceptions follow the consistent LetzShopException structure"""
"""Test that all inventory exceptions follow the consistent WizamartException structure"""
# Test with a known error case
response = client.get("/api/v1/inventory/9999999999999", headers=auth_headers)
assert response.status_code == 404
data = response.json()
# Verify exception structure matches LetzShopException.to_dict()
# Verify exception structure matches WizamartException.to_dict()
required_fields = ["error_code", "message", "status_code"]
for field in required_fields:
assert field in data, f"Missing required field: {field}"