Geotrek-admin
Geotrek-admin copied to clipboard
Optimize test duration
refactor test usage to improve test duration.
- By using
TestCasesubclasses only if required - By using
ApiTestCaseon DRF views - By using
force_loginif login should not be tested - By using
setupTestDatafor data creation andsetupfor user force_login
For example, by using these best practices on infrastructure.tests.test_admin, test duration decrease from 12s to 2s.