Remove db.expunge() calls that were causing DetachedInstanceError when accessing lazy-loaded relationships in tests. Changes: - conftest.py: Add documentation about fixture best practices - auth_fixtures: Remove expunge, keep objects attached to session - customer_fixtures: Remove expunge, add proper relationship loading - vendor_fixtures: Remove expunge, add test_company and other_company fixtures for proper company-vendor relationship setup - marketplace_import_job_fixtures: Remove expunge calls - marketplace_product_fixtures: Remove expunge calls The db fixture already provides test isolation by dropping/recreating tables after each test, so expunge is unnecessary and harmful. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
3.9 KiB
3.9 KiB