fix: add bin_location to inventory fixtures and service
- Add warehouse and bin_location fields to test fixtures - Update InventoryService to include warehouse/bin_location when creating entries - Fix all Inventory model instantiations in tests to include required fields - All 119 inventory tests now pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
5
tests/fixtures/vendor_fixtures.py
vendored
5
tests/fixtures/vendor_fixtures.py
vendored
@@ -191,6 +191,8 @@ def test_inventory(db, test_product):
|
||||
inventory = Inventory(
|
||||
product_id=test_product.id,
|
||||
vendor_id=test_product.vendor_id,
|
||||
warehouse="strassen",
|
||||
bin_location=f"SA-10-{unique_id[:2]}",
|
||||
location=f"WAREHOUSE_A_{unique_id}",
|
||||
quantity=100,
|
||||
reserved_quantity=10,
|
||||
@@ -208,7 +210,10 @@ def multiple_inventory_entries(db, multiple_products, test_vendor):
|
||||
inventory_entries = []
|
||||
for i, product in enumerate(multiple_products):
|
||||
inventory = Inventory(
|
||||
product_id=product.id,
|
||||
gtin=product.gtin,
|
||||
warehouse="strassen",
|
||||
bin_location=f"SA-{i:02d}-01",
|
||||
location=f"LOC_{i}",
|
||||
quantity=10 + (i * 5),
|
||||
reserved_quantity=i,
|
||||
|
||||
Reference in New Issue
Block a user