pytest-docker-tools provides pytest fixtures and helper functions for running Docker containers inside tests. It supports realistic integration testing when a production PostgreSQL database is unavailable, allowing hooks to use real database methods instead of mocked calls. section 10.2
PostgreSQL integration test
Define a movielens table through postgres-init.sql, start postgres:16-alpine with test credentials, and run a MovieLens-to-PostgreSQL operator against the real container.
