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:
2025-12-27 17:31:16 +01:00
parent ca63c13acc
commit bb0aabb918
6 changed files with 44 additions and 6 deletions

View File

@@ -251,6 +251,8 @@ class TestProductInventoryProperties:
inv1 = Inventory(
product_id=product.id,
vendor_id=test_vendor.id,
warehouse="strassen",
bin_location="SA-01-01",
location="WAREHOUSE_A",
quantity=100,
reserved_quantity=10,
@@ -258,6 +260,8 @@ class TestProductInventoryProperties:
inv2 = Inventory(
product_id=product.id,
vendor_id=test_vendor.id,
warehouse="strassen",
bin_location="SA-01-02",
location="WAREHOUSE_B",
quantity=50,
reserved_quantity=5,
@@ -311,6 +315,8 @@ class TestProductInventoryProperties:
inv = Inventory(
product_id=product.id,
vendor_id=test_vendor.id,
warehouse="strassen",
bin_location="DIG-01-01",
location="DIGITAL_LICENSES",
quantity=10,
reserved_quantity=2,