Skip to content

Fix all failing unit tests

Yuto Takano requested to merge fix-uts into master

A large number of unit tests were failing since 2021 because of a change in auth_backend that required JWT tokens to have the "home_organization" field (which test cases didn't provide).

In addition, last year there were two changes (removal of wiki transfer status on exams, change of 403 -> 401 on unauthorized requests), which broke a few other UTs.

Finally, because the docker-compose file sets PDEP_IS_PREVIEW, UTs that required non-admin users failed (since IS_PREVIEW sets everyone as admin). I fix this by ignoring that flag if TESTING is set.

This merge request fixes all above issues, resulting in the full 92 unit tests passing locally.

Merge request reports

Loading