Initial commit: webmail client (M0/M1)
Three-pane webmail client. - Backend: FastAPI + async SQLAlchemy + arq worker (Postgres/Redis), IMAP/SMTP sync, threading, search, drafts/outbox with undo, attachments, 2FA. - Frontend: React 18 + Vite + TypeScript + TanStack Query + Tailwind; three-pane UI with rich-text composer, light/dark themes, resizable panels. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
"""Folder-name special-use heuristics (SPEC §6.3)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
from app.sync.folder_names import infer_special_use
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"path,expected",
|
||||
[
|
||||
("INBOX", "inbox"),
|
||||
("inbox", "inbox"),
|
||||
("Sent", "sent"),
|
||||
("Wysłane", "sent"), # Polish
|
||||
("Elementy wysłane", "sent"),
|
||||
("Gesendet", "sent"), # German
|
||||
("Drafts", "drafts"),
|
||||
("Robocze", "drafts"),
|
||||
("Trash", "trash"),
|
||||
("Kosz", "trash"), # Polish
|
||||
("Papierkorb", "trash"), # German
|
||||
("Spam", "junk"),
|
||||
("Junk", "junk"),
|
||||
("Archive", "archive"),
|
||||
("Archiwum", "archive"),
|
||||
("INBOX/Sent", "sent"), # nested leaf
|
||||
("Work", None),
|
||||
("Random Folder", None),
|
||||
],
|
||||
)
|
||||
def test_infer_special_use(path: str, expected: str | None) -> None:
|
||||
assert infer_special_use(path) == expected
|
||||
Reference in New Issue
Block a user