feat(cleaner): ✨ add command prune
this new command will be called by cron-like process to clean purge old logs and old mails. All files were formatted and mail_utils was renamed in utils since it now defines utility function not only for mail functions.
This commit is contained in:
@@ -19,7 +19,7 @@ def empty_log_file_fixture(invalid_log_dir: Path) -> Path:
|
||||
@pytest.fixture(name="bad_log_file")
|
||||
def bad_log_file_fixture(invalid_log_dir: Path) -> Path:
|
||||
"""Path of a file containing only incorrectly formatted lines.
|
||||
|
||||
|
||||
Each line fails at a different point in LOG_PATTERN
|
||||
(invalid IP, missing timestamp, missing DOSSIER EN COURS, etc.).
|
||||
No LogEntry should be produced.
|
||||
@@ -93,7 +93,7 @@ def test_parse_lines():
|
||||
|
||||
|
||||
def test_parse_valid_lines(specific_logs: Path):
|
||||
"""Assert parse_lines works for all valid lines."""
|
||||
"""Assert parse_lines works for all valid lines."""
|
||||
# selected valid logs
|
||||
with open(specific_logs, "r") as file:
|
||||
log_lines = file.readlines()
|
||||
|
||||
Reference in New Issue
Block a user