Database integration tests with Pytest, SQLAlchemy and Factory Boy with Faker In this little example, I’m going to show a possible procedure to easily test your piece of code that interacts with a database. Python Development Databases