perf: Optimize slow tests with shared tenant fixtures
- Add session-scoped shared_tenant and second_shared_tenant fixtures to conftest.py - Refactor test_models.py and test_user_model.py to use shared fixtures - Avoid ~40s migration overhead per tenant by reusing fixtures across tests - Add pytest-xdist to dev dependencies for future parallel test execution Previously 4 tests each created their own tenant (~40s each = ~160s total). Now they share session-scoped tenants, reducing overhead significantly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -146,6 +146,7 @@ dev = [
|
||||
"pytest==9.0.1",
|
||||
"pytest-django==4.11.1",
|
||||
"pytest-sugar==1.1.1",
|
||||
"pytest-xdist>=3.5.0",
|
||||
"ruff==0.14.6",
|
||||
"sphinx==8.2.3",
|
||||
"sphinx-autobuild==2025.8.25",
|
||||
|
||||
Reference in New Issue
Block a user