test(coverage): add celery_worker coverage and remove dead config_validator.py

- Rewrite tests/test_celery_worker.py to mock check_credentials.apply_async
  at import time, enabling all 35 statements to be covered without Redis
- Add tests for conditional beat schedule entries (IMAP, Uptime Kuma)
- Delete app/utils/config_validator.py — dead code shadowed by the
  config_validator/ package directory (Python gives packages precedence)
- Remove both files from coverage omit in pyproject.toml
- celery_worker.py now at 100% coverage (was 0%)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-25 21:08:24 +00:00
parent 45e09a0ded
commit ffa0e1eb7b
4 changed files with 136 additions and 102 deletions
-8
View File
@@ -210,14 +210,6 @@ omit = [
"*/__pycache__/*",
"*/venv/*",
"*/env/*",
# This file is shadowed by the config_validator/ package directory and
# can never be imported via the normal Python import system. It is kept
# for historical reference only.
"app/utils/config_validator.py",
# celery_worker.py is an entry-point script for the Celery worker process;
# it initialises Celery beat schedules and cannot be meaningfully unit-tested
# without a live Redis + Celery environment.
"app/celery_worker.py",
]
[tool.coverage.report]