fix: update tests for current API structure and model changes
- Fix middleware fixtures: vendor_code instead of code, add owner_user_id to company
- Fix performance tests: MarketplaceProduct uses translations for title/description
- Fix security tests: use correct API endpoints (/api/v1/admin/*, /api/v1/vendor/*)
- Fix workflow tests: use actual admin API endpoints
- Fix background task tests: remove invalid vendor_name field, add language
Note: Many middleware integration tests still fail due to dynamic routes
being caught by the /{slug} catch-all route. These tests need further
refactoring to use /api/* prefixed routes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,10 +18,10 @@ class TestBackgroundTasks:
|
||||
job = MarketplaceImportJob(
|
||||
status="pending",
|
||||
source_url="http://example.com/test.csv",
|
||||
vendor_name="TESTVENDOR",
|
||||
marketplace="TestMarket",
|
||||
vendor_id=test_vendor.id,
|
||||
user_id=test_user.id,
|
||||
language="en",
|
||||
)
|
||||
db.add(job)
|
||||
db.commit()
|
||||
@@ -73,10 +73,10 @@ class TestBackgroundTasks:
|
||||
job = MarketplaceImportJob(
|
||||
status="pending",
|
||||
source_url="http://example.com/test.csv",
|
||||
vendor_name="TESTVENDOR",
|
||||
marketplace="TestMarket",
|
||||
vendor_id=test_vendor.id,
|
||||
user_id=test_user.id,
|
||||
language="en",
|
||||
)
|
||||
db.add(job)
|
||||
db.commit()
|
||||
@@ -158,10 +158,10 @@ class TestBackgroundTasks:
|
||||
job = MarketplaceImportJob(
|
||||
status="pending",
|
||||
source_url="http://example.com/test.csv",
|
||||
vendor_name="TESTVENDOR",
|
||||
marketplace="TestMarket",
|
||||
vendor_id=test_vendor.id,
|
||||
user_id=test_user.id,
|
||||
language="en",
|
||||
)
|
||||
db.add(job)
|
||||
db.commit()
|
||||
|
||||
Reference in New Issue
Block a user