Before we move on to implementation, we always test the system to see if it will work with all of its components. To do this, we need to label the integration tests, exclude them by default, and create a way to run them. Since pytest supports labels, called marks, we can use this feature to add a global mark to an entire module.

Update the test cases

Let’s put the following code into the tests/repository/postgres/test_postgresrepo.py file.

Get hands-on with 1400+ tech skills courses.