test updates to take into account exception management

This commit is contained in:
2025-09-27 13:47:36 +02:00
parent 3e720212d9
commit 6b9817f179
38 changed files with 2951 additions and 871 deletions

View File

@@ -231,10 +231,13 @@ class TestProductService:
def test_get_stock_info_success(self, db, test_product_with_stock):
"""Test getting stock info for product with stock"""
stock_info = self.service.get_stock_info(db, test_product_with_stock.gtin)
# Extract the product from the dictionary
product = test_product_with_stock['product']
stock_info = self.service.get_stock_info(db, product.gtin)
assert stock_info is not None
assert stock_info.gtin == test_product_with_stock.gtin
assert stock_info.gtin == product.gtin
assert stock_info.total_quantity > 0
assert len(stock_info.locations) > 0