You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The file test_manage_folders.py is a good start and an example of what we want for route tests.
Acceptance criteria:
new module test for datastore functions
all routes have a unit test using a mock/patch for datastore functions :
an end-to-end test verifies everything
coverage must be at least 80% (pytest --cov=. --cov-fail-under=80 tests/ )
The text was updated successfully, but these errors were encountered:
I closed this issue so as not to leave any work pending before I leave (end of my internship). So far, here's what's been done about the issue:
new test module to test each datastore function
directory routes have a unit test using a mock/patch for datastore functions
Required test coverage of 80% reached
I've opened a new issue ( #123 ) that follows this one because there's still a lot of work to be done on route testing with mocks to avoid using the database and Azure storage.
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
The file
test_manage_folders.py
is a good start and an example of what we want for route tests.Acceptance criteria:
pytest --cov=. --cov-fail-under=80 tests/
)The text was updated successfully, but these errors were encountered: