diff --git a/tests/integration/middleware/conftest.py b/tests/integration/middleware/conftest.py index d2df7e00..fd6a1564 100644 --- a/tests/integration/middleware/conftest.py +++ b/tests/integration/middleware/conftest.py @@ -93,8 +93,15 @@ def vendor_with_theme(db, middleware_test_company): # Add custom theme theme = VendorTheme( vendor_id=vendor.id, - primary_color="#FF5733", - secondary_color="#33FF57", + theme_name="custom", + colors={ + "primary": "#FF5733", + "secondary": "#33FF57", + "accent": "#ec4899", + "background": "#ffffff", + "text": "#1f2937", + "border": "#e5e7eb", + }, logo_url="/static/vendors/themedvendor/logo.png", favicon_url="/static/vendors/themedvendor/favicon.ico", custom_css="body { background: #FF5733; }", diff --git a/tests/integration/middleware/test_theme_loading_flow.py b/tests/integration/middleware/test_theme_loading_flow.py index 045a08ee..96e01df0 100644 --- a/tests/integration/middleware/test_theme_loading_flow.py +++ b/tests/integration/middleware/test_theme_loading_flow.py @@ -347,8 +347,14 @@ class TestThemeLoadingFlow: theme = VendorTheme( vendor_id=vendor_with_custom_domain.id, - primary_color="#123456", - secondary_color="#654321", + colors={ + "primary": "#123456", + "secondary": "#654321", + "accent": "#ec4899", + "background": "#ffffff", + "text": "#1f2937", + "border": "#e5e7eb", + }, ) db.add(theme) db.commit() diff --git a/tests/unit/models/schema/test_customer.py b/tests/unit/models/schema/test_customer.py index 2abdcec9..a897ae31 100644 --- a/tests/unit/models/schema/test_customer.py +++ b/tests/unit/models/schema/test_customer.py @@ -159,6 +159,7 @@ class TestCustomerResponseSchema: "phone": None, "customer_number": "CUST001", "marketing_consent": False, + "preferred_language": "fr", "last_order_date": None, "total_orders": 5, "total_spent": Decimal("500.00"), @@ -339,12 +340,12 @@ class TestCustomerPreferencesUpdateSchema: """Test partial update with only some fields.""" update = CustomerPreferencesUpdate(marketing_consent=True) assert update.marketing_consent is True - assert update.language is None + assert update.preferred_language is None def test_language_update(self): """Test language preference update.""" - update = CustomerPreferencesUpdate(language="fr") - assert update.language == "fr" + update = CustomerPreferencesUpdate(preferred_language="fr") + assert update.preferred_language == "fr" def test_currency_update(self): """Test currency preference update."""