← ClaudeAtlas

hex-test-domainlisted

Use when testing a domain entity, value object, enum or domain service with stdlib, `pytest` and `myapp.domain` — no IO, no fixtures, no container, and an orchestrator service run on the in-memory fake of its port. Covers identity equality, one test per invariant and the pinned enum member set; a frozen value object with neither an invariant nor a normalized equality gets no test file at all. Not for writing the domain object itself — `hex-domain-model` or `hex-domain-service`.
wntic/pyhouse · ★ 3 · AI & Automation · score 76
Install: claude install-skill wntic/pyhouse
# Hex Test — Domain Consult `test-principles` for the testing constitution. Where this skill contradicts `test-principles`, the constitution wins. The four kinds of test the domain layer takes: stdlib plus `pytest` plus `myapp.domain.*`, and for an orchestrator service the hand-written fake of its port. ## When to use vs. neighbours Inside this skill, by what is under test — the four templates under `## Template(s)`. Outside it: - An application command or query handler → `hex-test-application-handler`. - An in-memory fake under `tests/unit/fakes/` → `hex-test-application-handler`. - A grep-firewall architectural rule → `test-architecture-rule`. - The infrastructure adapter implementing a protocol a service depends on → `hex-test-repository-contract` (repository) or `hex-test-capability-adapter` (capability). A normalizing function is tested here when it is pure domain logic with no library behind it; one that delegates to an external library sits behind a capability port, and its adapter is `hex-test-capability-adapter`'s. - The handler that *uses* a service, end to end → `hex-test-restapi-endpoint`. - The domain object itself rather than its test → `hex-domain-model` (entity, value object, enum) or `hex-domain-service`. - Anything that needs a fixture, a container or a database — "add a testcontainer fixture for Postgres" included → `hex-test-integration-setup`; nothing in this skill takes a fixture. - The no-mocks rule and the pure-unit speed target → `test-principles