Main exception renamed to WizamartException
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user