-
Task
-
Resolution: Done
-
Medium
-
None
-
SIMPLY Sprint 3 Feb 2 - 16, SIMPLY Sprint 4 Feb 16 - Mar 2
We need to move away from the shared test object model that the Circulation Manager follows (where we subclass core.testing.*), in favor of Pytest fixtures. That won't be a small effort, so this is an initial investigation into how we can do that smoothly.
As an initial pass it may make sense to take some small test files and refactor them to find out what the most immediate improvements will need to be. Then we can move on to the test files with more surface area, and which have more complex database object dependencies.
Some candidates for refactoring:
- tests/test_kansas_patron.py - relatively short test file, mostly deals with a pretty encapsulated set of functionality
- tests/test_patron_utility.py - also pretty short and encapsulated
- core/tests/test_cdn.py - probably not many db objects, but means getting test functionality out of the DatabaseTest class
- core/tests/models/test_admin.py - simple, but requiring some db objects
The goal here is to do some small scale refactoring so we can plan the bigger pieces of work in more detail.