← ClaudeAtlas

hex-test-integration-setuplisted

Use when laying or changing the `tests/integration/conftest.py` hierarchy one hexagonal package's suite rests on — session-scoped testcontainers, the Alembic run and the disposable-database guard, savepoint-rollback isolation through the `session_factory` fixture, each store add-on's fixtures (the key-value store is the worked one), the per-test dishka composition root whose infrastructure providers are overridden, and `real_app` over it where the service has a REST entrypoint — or the same fixtures as one plugin module several hexagonal workspace members share. Maps the whole suite tree and names the skill that writes each file in it. Owns the Postgres container fixture; testing a repository against it is `hex-test-repository-contract`. Not a flat-layered service's fixtures, which are `flat-test-integration-setup`, in the `pyhouse-flat` plugin.
wntic/pyhouse · ★ 3 · Code & Development · score 76
Install: claude install-skill wntic/pyhouse
# Hex Test — Integration Setup Consult `test-principles` for the testing constitution. Where this skill contradicts `test-principles`, the constitution wins. One-shot per project, and everything else in the integration suite depends on it. ## When to use vs. neighbours - Laying the base conftest for the first time, or changing a fixture in it → this skill. - A repository contract test → `hex-test-repository-contract` (consumes `session_factory`). - An API endpoint test → `hex-test-restapi-endpoint` (consumes `real_app`, the REST add-on, and the store's own fixture where it seeds rows). - The app-wide checks — the construct smoke, the error shape of every advertised code, CORS, the request-size limit → `hex-test-app-invariants`; they build the app themselves and take none of these fixtures. - A handler test that runs on in-memory fakes and needs no database at all → `hex-test-application-handler`; none of these fixtures apply to it. - A capability adapter's own assertions — the HTTP gateway over a stub transport, the SDK-error translation, the pure-CPU case → `hex-test-capability-adapter`. The session-scoped container its backend needs is still declared here. - The signing-key and token-minting fixtures, the authenticated client, and the `jwt_settings` override `container` grows in an auth app, where `container` then resolves only under `tests/integration/api/` → `hex-test-restapi-auth`. Only for an app that declares auth; this skill is complete without it. - The route-sid