test: update tests for multi-language translation support

- Update marketplace_product_fixtures to create translations
- Update test_marketplace_product.py for translation-based titles
- Update test_product.py for effective property tests
- Update test_order.py to use get_title() method
- Add comprehensive CSV processor tests for translations
- Update stats service tests for new flat response structure
- Fix product schema tests with required marketplace_product_id field
- Add helper function create_marketplace_product_with_translation()

🤖 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-11 17:29:50 +01:00
parent 22c4937779
commit 2ecc2a9785
8 changed files with 790 additions and 201 deletions

View File

@@ -152,11 +152,14 @@ class TestOrderItemModel:
def test_order_item_creation(self, db, test_order, test_product):
"""Test OrderItem model."""
# Get title from translation
product_title = test_product.marketplace_product.get_title("en")
order_item = OrderItem(
order_id=test_order.id,
product_id=test_product.id,
product_name=test_product.marketplace_product.title,
product_sku=test_product.product_id or "SKU001",
product_name=product_title,
product_sku=test_product.vendor_sku or "SKU001",
quantity=2,
unit_price=49.99,
total_price=99.98,