Database Fixtures

When we define the database configuration in a JSON file, we need a fixture that loads that same configuration. This is so we can connect to the database during our tests. Since we already have the function read_json_configuration in our management script, all we need to do is wrap it.

Update the conftest file

Update the common conftest file

This is a fixture that isn’t specific to the PostgreSQL repository, so we’ll introduce it in the following code.

Get hands-on with 1200+ tech skills courses.