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:
@@ -1,30 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Configuration validation for the application.
|
||||
This file serves as a backward-compatible interface to the config_validator package.
|
||||
"""
|
||||
|
||||
from app.utils.config_validator.masking import mask_sensitive_value
|
||||
from app.utils.config_validator.providers import get_provider_status
|
||||
from app.utils.config_validator.settings_display import dump_all_settings, get_settings_for_display
|
||||
|
||||
# Import and re-export all functions from the new package
|
||||
from app.utils.config_validator.validators import (
|
||||
check_all_configs,
|
||||
validate_auth_config,
|
||||
validate_email_config,
|
||||
validate_notification_config,
|
||||
validate_storage_configs,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"validate_email_config",
|
||||
"validate_storage_configs",
|
||||
"validate_notification_config",
|
||||
"validate_auth_config",
|
||||
"mask_sensitive_value",
|
||||
"get_provider_status",
|
||||
"get_settings_for_display",
|
||||
"dump_all_settings",
|
||||
"check_all_configs",
|
||||
]
|
||||
Reference in New Issue
Block a user