litestar-testing

Installation
SKILL.md

litestar-testing

Litestar-specific testing patterns built on pytest + anyio. Covers:

  • TestClient vs AsyncTestClient — when to use each
  • @pytest.mark.anyio setup
  • App + lifespan in tests
  • Fixture patterns from canonical litestar-fullstack tests
  • Mocking Guards and DI dependencies
  • Integration with pytest-databases (see ../pytest-databases/SKILL.md)
  • Autowire discovery and cache isolation (see ../litestar-autowire/references/testing.md)
  • Request body / form / multipart / header / cookie testing
  • Litestar-specific assertion patterns (Response, headers, cookies)

For JS-side testing (Vitest, Testing Library, Playwright), use the upstream Vitest docs and Litestar's own JS examples. Out of scope here.

Code Style Rules

Installs
10
GitHub Stars
13
First Seen
May 18, 2026
litestar-testing — litestar-org/litestar-skills