ai-cfia / nachet-backend

A flask-based backend for Nachet to handle Azure endpoint and Azure storage API requests from the frontend.
MIT License
1 stars 4 forks source link

Improve backend tests #123

Open sylvanie85 opened 3 weeks ago

sylvanie85 commented 3 weeks ago

This issue follows on from this one #92 Improve backend tests

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. Tests should avoid any direct interaction with the Azure storage and database, as these interactions incur costs and risk generating incorrect data.

Objective

Making sure that all routes work. Deleting the entries in the database if some are created The file test_manage_folders.py is an example of what we want for route tests, but feel free to improve it.

Acceptance criteria: