Loading
Update stale tests to match current crafty behaviour
What does this MR do and why?
Updates outdated tests to match current crafty behaviour, fixing 9 failures:
- Use
settings["path"]in backup mocks. - Update log endpoint calls and verify 16 permission combinations.
- Verify ZIP traversal rejection and successful safe extraction.
- Isolate role test database bindings and ensure cleanup.
No application behaviour changes.
How to set up and validate locally
In an activated project virtual environment:
python -m pip install -r requirements.txt
python -m pip install pytest pytest-cov
python -m pytest --cov=app --cov-report=term --cov-report=xml:coverage.xmlValidated on Windows with Python 3.12.9: 54 tests pass. One existing Peewee/SQLite deprecation warning remains, and should probably be looked at at some point.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
- Have you checked this doesn't interfere/conflict/duplicate someone elses work?
- Have you fully tested your changes?
- Have you resolved any lint issues?
- Have you assigned a reviewer?
- Have you applied correct labels?