Skip to course content
Free FastAPI backend course

FastAPI for AI Backend Development

Module 09

Testing FastAPI Endpoints with Fixtures

By the end of this module you can test endpoints properly with fixtures and an overridden dependency, so tests run without a live database or a paid API call.

Units

  1. Unit 09.00: Testing the whole request path in-process
  2. Unit 09.01: Fixtures that make a test readable
  3. Unit 09.02: Overriding the expensive dependency
  4. Unit 09.03: Asserting on the contract, not the wording
  5. Unit 09.04: A suite fast enough to run on every save

Module work