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

@@ -469,14 +469,14 @@ class TestInventoryService:
self.service.add_inventory(db, inventory_data_add)
def test_exception_structure_consistency(self, db):
"""Test that all exceptions follow the consistent LetzShopException structure."""
"""Test that all exceptions follow the consistent WizamartException structure."""
# Test with a known error case
with pytest.raises(InventoryNotFoundException) as exc_info:
self.service.get_inventory_by_gtin(db, "9999999999999")
exception = exc_info.value
# Verify exception structure matches LetzShopException.to_dict()
# Verify exception structure matches WizamartException.to_dict()
assert hasattr(exception, 'error_code')
assert hasattr(exception, 'message')
assert hasattr(exception, 'status_code')