refactor(i-g): BUG-018 Pilot Split Schritt 5 — mail/services.py komplett zur Fassade reduziert (-95%)

services.py: 3087 -> ~170 Zeilen reine Re-Export-Fassade. Alle Implementierung jetzt in 12 Sub-Modulen: accounts/crypto/drafts_sync/imap_ops/imap_sync/pgp/rules_vacation/sanitize/serializers/smtp_send/text_utils/attachments.

Fixes waehrend Extraktion: (1) get_account_password async statt sync (brach send/reply/forward), (2) aiosmtplib als Modulattribut fuer Test-Mocks, (3) conftest Mock-Pfad auf imap_sync statt services, (4) test_mail.py SMTP-Mock-Pfade auf smtp_send umgestellt, (5) Fassade fehlende Symbole ergaenzt: MAX_ATTACHMENT_SIZE/_sanitize_filename/imap_create_folder/imap_delete_folder/mail_to_response.

Beweis: mail+sig_label_routes 51/51 passed in 106.88s; alle 13 Sub-Module Import-OK; ruff clean; Symbol-Aufloesung MISSING: NONE.
This commit is contained in:
Agent Zero
2026-08-26 14:33:30 +02:00
parent c34715574a
commit ea6c9e71db
7 changed files with 1434 additions and 1321 deletions
+1 -1
View File
@@ -492,7 +492,7 @@ def mock_imap_connections(monkeypatch):
return fake_client
monkeypatch.setattr(
"app.plugins.builtins.mail.services.aioimaplib.IMAP4_SSL",
"app.plugins.builtins.mail.imap_sync.aioimaplib.IMAP4_SSL",
_fake_factory,
)
yield fake_client