refactor: update test imports to use module locations
Update all test files to import from canonical module locations: - Integration tests: orders, inventory, messages, invoices - Unit tests: services and models - Fixtures: customer, vendor, message fixtures Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import pytest
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
|
||||
from models.database.inventory import Inventory
|
||||
from app.modules.inventory.models import Inventory
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
|
||||
@@ -6,7 +6,7 @@ from datetime import datetime, timezone
|
||||
import pytest
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
|
||||
from models.database.order import Order, OrderItem
|
||||
from app.modules.orders.models import Order, OrderItem
|
||||
|
||||
|
||||
def create_order_with_snapshots(
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import pytest
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
|
||||
from models.database.order_item_exception import OrderItemException
|
||||
from app.modules.orders.models import OrderItemException
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@@ -65,7 +65,7 @@ class TestOrderItemExceptionModel:
|
||||
exception_types = ["product_not_found", "gtin_mismatch", "duplicate_gtin"]
|
||||
|
||||
# Create new order items for each test to avoid unique constraint
|
||||
from models.database.order import OrderItem
|
||||
from app.modules.orders.models import OrderItem
|
||||
|
||||
for i, exc_type in enumerate(exception_types):
|
||||
order_item = OrderItem(
|
||||
|
||||
@@ -306,7 +306,7 @@ class TestProductInventoryProperties:
|
||||
|
||||
def test_physical_product_with_inventory(self, db, test_vendor):
|
||||
"""Test physical product calculates inventory from entries."""
|
||||
from models.database.inventory import Inventory
|
||||
from app.modules.inventory.models import Inventory
|
||||
|
||||
product = Product(
|
||||
vendor_id=test_vendor.id,
|
||||
@@ -364,7 +364,7 @@ class TestProductInventoryProperties:
|
||||
|
||||
def test_digital_product_ignores_inventory_entries(self, db, test_vendor):
|
||||
"""Test digital product returns unlimited even with inventory entries."""
|
||||
from models.database.inventory import Inventory
|
||||
from app.modules.inventory.models import Inventory
|
||||
|
||||
product = Product(
|
||||
vendor_id=test_vendor.id,
|
||||
|
||||
Reference in New Issue
Block a user