Skip to content

Glossary: Building APIs with FastAPI

Fixture

Also written: fixtures, pytest fixture

A pytest function that prepares something tests need, such as a fresh database session or a logged-in header. A test gets it by naming it as a parameter.

Where the book teaches it

Related terms

conftest.pypytest