ST 531: Refactor old test code
The goal of this merge request is to refactor the old test code to make it more maintainable, scalable, understandable and faster.
The merge is intended to be merged into ST-530 and does the following:
- Creates a
test
directory, which holds all of the utilities and data needed for the test cases. The actual tests have been moved totests
directories which are located in their respective modules - Altered existing JSON file data to fit with the Django test fixture format
- Created factories for the main models
- Refactored the old admin and api tests to use test fixtures instead of the old database population method. (Also includes the same tests as factories to demonstrate how the factories can be used. This can be removed when merging)
- Altered functions to fit with the new structure
- Split the base tests for the admin and api tests into two classes to maintain the Single Responsibility Principle. This merge is not intended to be the final version of the changes to be added, but instead should be used to review the changes and add suggested improvements to improve the overall quality of the code