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:
@@ -8,7 +8,7 @@ import pytest
|
||||
from app.exceptions import AddressLimitExceededException, AddressNotFoundException
|
||||
from app.services.customer_address_service import CustomerAddressService
|
||||
from app.modules.customers.models.customer import CustomerAddress
|
||||
from models.schema.customer import CustomerAddressCreate, CustomerAddressUpdate
|
||||
from app.modules.customers.schemas import CustomerAddressCreate, CustomerAddressUpdate
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
@@ -13,8 +13,8 @@ from app.exceptions import (
|
||||
ProductNotFoundException,
|
||||
)
|
||||
from app.services.inventory_service import InventoryService
|
||||
from models.database.inventory import Inventory
|
||||
from models.schema.inventory import (
|
||||
from app.modules.inventory.models import Inventory
|
||||
from app.modules.inventory.schemas import (
|
||||
InventoryAdjust,
|
||||
InventoryCreate,
|
||||
InventoryReserve,
|
||||
|
||||
@@ -16,13 +16,13 @@ from app.services.invoice_service import (
|
||||
InvoiceService,
|
||||
LU_VAT_RATES,
|
||||
)
|
||||
from models.database.invoice import (
|
||||
from app.modules.orders.models import (
|
||||
Invoice,
|
||||
InvoiceStatus,
|
||||
VATRegime,
|
||||
VendorInvoiceSettings,
|
||||
)
|
||||
from models.schema.invoice import (
|
||||
from app.modules.orders.schemas import (
|
||||
VendorInvoiceSettingsCreate,
|
||||
VendorInvoiceSettingsUpdate,
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import pytest
|
||||
|
||||
from app.services.messaging_service import MessagingService
|
||||
from models.database.message import (
|
||||
from app.modules.messaging.models import (
|
||||
Conversation,
|
||||
ConversationParticipant,
|
||||
ConversationType,
|
||||
|
||||
@@ -10,8 +10,8 @@ from app.exceptions import (
|
||||
ProductNotFoundException,
|
||||
)
|
||||
from app.services.order_item_exception_service import OrderItemExceptionService
|
||||
from models.database.order import OrderItem
|
||||
from models.database.order_item_exception import OrderItemException
|
||||
from app.modules.orders.models import OrderItem
|
||||
from app.modules.orders.models import OrderItemException
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
@@ -28,7 +28,7 @@ from app.services.order_service import (
|
||||
order_service,
|
||||
)
|
||||
from app.modules.customers.models.customer import Customer
|
||||
from models.database.order import Order, OrderItem
|
||||
from app.modules.orders.models import Order, OrderItem
|
||||
|
||||
|
||||
# Default address fields required by Order model
|
||||
@@ -328,7 +328,7 @@ class TestOrderServiceUpdates:
|
||||
|
||||
def test_update_order_status(self, db, test_vendor, test_customer):
|
||||
"""Test update_order_status changes status"""
|
||||
from models.schema.order import OrderUpdate
|
||||
from app.modules.orders.schemas import OrderUpdate
|
||||
|
||||
order = Order(
|
||||
vendor_id=test_vendor.id,
|
||||
|
||||
@@ -9,7 +9,7 @@ from sqlalchemy.exc import SQLAlchemyError
|
||||
|
||||
from app.exceptions import AdminOperationException, VendorNotFoundException
|
||||
from app.services.stats_service import StatsService
|
||||
from models.database.inventory import Inventory
|
||||
from app.modules.inventory.models import Inventory
|
||||
from models.database.marketplace_product import MarketplaceProduct
|
||||
from models.database.marketplace_product_translation import (
|
||||
MarketplaceProductTranslation,
|
||||
|
||||
Reference in New Issue
Block a user