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)
  • 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
5
GitHub Stars
8
First Seen
May 18, 2026
litestar-testing — litestar-org/litestar-skills