[Arch] email_service.py, notifiers/webhook.py, middleware.py are essentially untested #66

Closed
opened 2026-07-01 07:27:19 +02:00 by bullitt · 1 comment
Owner

Severity: Medium | Category: Testing

email_service.py — 37% coverage, no dedicated test file. notifiers/webhook.py — no test file at all (unlike mqtt/ntfy which both have one). middleware.py (AccessLogMiddleware) — 0% coverage.

Recommendation: Add test_email_service.py (mock SMTP), test_webhook_notifier.py (mirror the test_mqtt.py/test_ntfy_notifier.py pattern with respx), and test_middleware.py.

Full detail: docs/architecture-review.md § C, Finding "email_service.py, notifiers/webhook.py, and middleware.py..."

**Severity:** Medium | **Category:** Testing `email_service.py` — 37% coverage, no dedicated test file. `notifiers/webhook.py` — no test file at all (unlike mqtt/ntfy which both have one). `middleware.py` (`AccessLogMiddleware`) — 0% coverage. **Recommendation:** Add `test_email_service.py` (mock SMTP), `test_webhook_notifier.py` (mirror the `test_mqtt.py`/`test_ntfy_notifier.py` pattern with `respx`), and `test_middleware.py`. Full detail: `docs/architecture-review.md` § C, Finding "email_service.py, notifiers/webhook.py, and middleware.py..."
Author
Owner

Fixed on branch architecture-rework, commit ca4161e: added tests/test_email_service.py, tests/test_webhook_notifier.py, tests/test_middleware.py. All three modules now at 100% line coverage (up from 37%/64%/0%). Full suite: 276 passed.

Fixed on branch `architecture-rework`, commit ca4161e: added `tests/test_email_service.py`, `tests/test_webhook_notifier.py`, `tests/test_middleware.py`. All three modules now at 100% line coverage (up from 37%/64%/0%). Full suite: 276 passed.
Sign in to join this conversation.
No labels
arch
harness
security
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bullitt/trackbox#66
No description provided.