py-integration-test
Installation
SKILL.md
Python Integration Testing
Overview
Integration tests with real dependencies using testcontainers-python. Test against actual Postgres with async SQLAlchemy sessions.
Core principle: If it talks to a database, test it with a real database. Mock nothing at the infrastructure boundary.
When to Use
- Testing SQLAlchemy repository implementations
- Full HTTP lifecycle tests (router → use case → repo → DB)
- Verifying Alembic migrations
- Testing Redis cache logic