We want to improve backend testing, currently we test each route with a success case and an error case. The current problem is that our tests are dependent of the datastore and each tests commit changes to the database and therefore shouldn't be committed.
Objective
Add module tests to ensure that all functions work independently of the routes.
Making sure that all routes work.
Deleting the entries in the database if some are created.
Acceptance criteria:
new module test for datastore functions
all routes have a unit test using a mock/patch for datastore functions
Context
We want to improve backend testing, currently we test each route with a success case and an error case. The current problem is that our tests are dependent of the datastore and each tests commit changes to the database and therefore shouldn't be committed.
Objective
Acceptance criteria: