style(project): 🎨 improve all docstrings and centralize mail variables in mail_utils

This commit is contained in:
2026-09-17 12:59:07 +02:00
parent 6909ee7acf
commit 5e43a0cbb8
17 changed files with 116 additions and 101 deletions
+3
View File
@@ -7,6 +7,7 @@ from logwatcher.models import LogEntry
def test_valid_log_entry():
"""Assert a log entry is correctly created when all arguments are correct."""
LogEntry(
server_ip="192.168.13.27",
mdc_server_name="MDC_720",
@@ -18,6 +19,7 @@ def test_valid_log_entry():
)
def test_log_entry_invalid_dates():
"""Assert a log entry cannot be created if start time is not later than error time."""
with pytest.raises(ValueError, match="Error in date-times"):
LogEntry(
server_ip="192.168.13.27",
@@ -30,6 +32,7 @@ def test_log_entry_invalid_dates():
)
def test_equals_models():
"""Assert two models are equals if they have the same value as attributes."""
log_entry_1 = LogEntry(
server_ip="192.168.13.27",
mdc_server_name="MDC_720",