continuous-integration/drone/push Build is failing
`scripts/lint.sh --fix` from the pinned lint devshell: 90 Python files reformatted (ruff format, mechanical) and one C420 (dict comprehension → dict.fromkeys) in tests/unit/test_f211_sso_skip.py. The push self-test had been failing at the lint stage since build 1313 (2026-08-31) on exactly these files; nothing else changed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FqkQq3CDmFWcQ7u1LzoyRz
30 lines
1001 B
Python
30 lines
1001 B
Python
"""mailu — recipe-specific functional test #1 (Phase 2 P3 §4.3 create-an-object + read-back).
|
|
|
|
Create a mailbox (the characteristic mailu object) via the admin CLI, then read it back from the
|
|
authoritative config export and assert it is present. Real create→persist→read-back, not health-only.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
import sys
|
|
import uuid
|
|
|
|
sys.path.insert(0, os.path.dirname(__file__))
|
|
import _mailu # noqa: E402
|
|
|
|
|
|
def test_create_mailbox_and_read_back(live_app):
|
|
mail_domain = live_app # recipe_meta sets MAIL_DOMAIN = the per-run domain
|
|
local = "ccci-" + uuid.uuid4().hex[:8]
|
|
password = "CcCi-" + uuid.uuid4().hex[:16] + "-Aa1!"
|
|
|
|
_mailu.ensure_domain(live_app, mail_domain)
|
|
email = _mailu.create_user(live_app, local, mail_domain, password)
|
|
|
|
cfg = _mailu.config_export(live_app)
|
|
emails = _mailu.user_emails(cfg)
|
|
assert email in emails, (
|
|
f"created mailbox {email} not present in mailu config-export users {emails}"
|
|
)
|