test: finalize CI test coverage and fix dependency import path

This commit is contained in:
2026-06-17 16:39:22 +01:00
parent aa746b780d
commit 91d70cf10c
4 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
aiosmtpd>=1.6.3 aiosmtpd>=1.4.6,<1.5
pytest>=8.0.0 pytest>=8.0.0
+7
View File
@@ -0,0 +1,7 @@
import os
import sys
# Ensure the project root is on sys.path when running tests.
ROOT = os.path.dirname(os.path.dirname(__file__))
if ROOT not in sys.path:
sys.path.insert(0, ROOT)
+1 -1
View File
@@ -114,7 +114,7 @@ def test_smtp_proxy_handler_forwards_message_over_ssl(monkeypatch):
assert captured["instance"].logged_in is True assert captured["instance"].logged_in is True
assert captured["instance"].sent[0] == "from@example.com" assert captured["instance"].sent[0] == "from@example.com"
assert captured["instance"].sent[1] == ["to@example.com"] assert captured["instance"].sent[1] == ["to@example.com"]
assert b"Subject: Test" in captured["instance"].sent[2] assert "Subject: Test" in captured["instance"].sent[2]
Settings.BACKEND_SMTP_USE_SSL = previous_ssl Settings.BACKEND_SMTP_USE_SSL = previous_ssl
Settings.BACKEND_SMTP_USER = previous_user Settings.BACKEND_SMTP_USER = previous_user