fc4f5631ee
- Add comprehensive tests for imap_tasks.py covering: - Lock acquire/release mechanisms - pull_all_inboxes task with various scenarios - pull_inbox for Gmail and non-Gmail with edge cases - find_all_mail_xlist functionality - Extended fetch_attachments tests for all MIME types - Edge cases: invalid JSON, missing Message-ID, already processed, etc. - Achieve 98.26% coverage for imap_tasks.py (up from 48.78%) - Fix config_validator.py to include validate_auth_config export - Update tests to verify all exports including validate_auth_config - Note: config_validator.py file is shadowed by config_validator/ directory in Python's module resolution, so it cannot be directly imported or tested. The package's __init__.py (which has 100% coverage) is what's actually used. Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
31 lines
930 B
Python
31 lines
930 B
Python
#!/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",
|
|
]
|