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}"

View File

@@ -329,14 +329,14 @@ class TestMarketplaceProductsAPI:
assert data["status_code"] == 401
def test_exception_structure_consistency(self, client, auth_headers):
"""Test that all exceptions follow the consistent LetzShopException structure"""
"""Test that all exceptions follow the consistent WizamartException structure"""
# Test with a known error case
response = client.get("/api/v1/marketplace/product/NONEXISTENT", 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}"

View File

@@ -299,7 +299,7 @@ class TestPagination:
assert response.status_code == 422
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}"

View File

@@ -368,14 +368,14 @@ class TestVendorsAPI:
assert data["error_code"] == "VALIDATION_ERROR"
def test_exception_structure_consistency(self, client, auth_headers):
"""Test that all vendor exceptions follow the consistent LetzShopException structure"""
"""Test that all vendor exceptions follow the consistent WizamartException structure"""
# Test with a known error case
response = client.get("/api/v1/vendor/NONEXISTENT", 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}"