Release govoplan-mail v0.1.27: stabilize credentials, folder encoding and transport progress
Module Package Release / publish-packages (push) Successful in 11s
Module Package Release / publish-packages (push) Successful in 11s
This commit is contained in:
@@ -8,6 +8,7 @@ from sqlalchemy.orm import Session
|
||||
|
||||
from govoplan_core.core.modules import DocumentationContext
|
||||
from govoplan_mail.backend.documentation import (
|
||||
_credential_line,
|
||||
documentation_configuration_states,
|
||||
documentation_topics,
|
||||
)
|
||||
@@ -26,6 +27,46 @@ class _Principal:
|
||||
|
||||
|
||||
class MailRuntimeDocumentationTests(unittest.TestCase):
|
||||
def test_mailbox_toolbar_contract_documents_context_refresh_and_read_only_bounds_in_both_languages(self) -> None:
|
||||
from govoplan_mail.backend.manifest import manifest
|
||||
topic = next(item for item in manifest.documentation if item.id == "mail.workflow.read-mailbox")
|
||||
self.assertEqual(set(topic.documentation_types), {"user", "admin"})
|
||||
self.assertTrue({"mail.mailbox.reload", "mail.mailbox.tools"}.issubset(topic.metadata["help_contexts"]))
|
||||
for phrase in ("one right-aligned Reload", "Mailbox tools", "IMAP retains the current page", "JMAP starts a fresh cursor chain", "Failed refreshes preserve usable loaded data", "ignore late reads", "do not grant profile administration rights"):
|
||||
self.assertIn(phrase, topic.body)
|
||||
for phrase in ("genau einmal Neuladen rechts", "Postfachwerkzeuge", "IMAP behält die Seite", "JMAP beginnt", "Verspätete Antworten", "Fehlgeschlagene Aktualisierungen", "keine Profilverwaltungsrechte"):
|
||||
self.assertIn(phrase, topic.translations["de"]["body"])
|
||||
|
||||
def test_imap_batch_contract_documents_bounds_and_per_message_safety_in_both_languages(self) -> None:
|
||||
from govoplan_mail.backend.manifest import manifest
|
||||
topic = next(item for item in manifest.documentation if item.id == "mail.reference.campaign-delivery-contract")
|
||||
for body in (topic.body, topic.translations["de"]["body"]):
|
||||
self.assertIn("campaign_imap_batch", body)
|
||||
self.assertIn("GOVOPLAN_IMAP_BATCH_REUSE", body)
|
||||
self.assertIn("MULTIAPPEND", body)
|
||||
self.assertIn("100", body)
|
||||
self.assertIn("300", body)
|
||||
self.assertIn("permissions and recovery evidence are never cached", topic.body)
|
||||
self.assertIn("no automatic APPEND replay", topic.body)
|
||||
self.assertIn("Berechtigungen und Nachweise werden nicht zwischengespeichert", topic.translations["de"]["body"])
|
||||
|
||||
def test_campaign_contract_documents_protocol_scoped_runtime_and_complete_validation(self) -> None:
|
||||
from govoplan_mail.backend.manifest import manifest
|
||||
topic = next(item for item in manifest.documentation if item.id == "mail.reference.campaign-delivery-contract")
|
||||
self.assertIn("Runtime credential-selection checks are protocol-scoped", topic.body)
|
||||
self.assertIn("still check both configured protocols", topic.body)
|
||||
self.assertIn("before credential decryption or provider contact", topic.body)
|
||||
self.assertIn("protokollbezogen", topic.translations["de"]["body"])
|
||||
self.assertIn("weiterhin beide konfigurierten Protokolle", topic.translations["de"]["body"])
|
||||
|
||||
def test_credential_policy_guidance_describes_explicit_mail_references_not_local_secrets(self) -> None:
|
||||
text = _credential_line({"smtp_credentials": {"inherit": False}, "imap_credentials": {"inherit": True}})
|
||||
self.assertIn("SMTP requires an explicit Mail credential", text)
|
||||
self.assertIn("IMAP allows a profile default or explicit Mail credential", text)
|
||||
self.assertIn("Secrets remain in Mail", text)
|
||||
self.assertNotIn("local credentials", text)
|
||||
self.assertNotIn("only for protocols that inherit", text)
|
||||
|
||||
def setUp(self) -> None:
|
||||
self.session = Session()
|
||||
|
||||
@@ -182,7 +223,7 @@ class MailRuntimeDocumentationTests(unittest.TestCase):
|
||||
|
||||
topics = {topic.id: topic for topic in get_manifest().documentation}
|
||||
self.assertEqual(topics["mail.workflow.choose-and-test-profile"].metadata["help_contexts"], ["mail.profiles", "app.settings"])
|
||||
self.assertEqual(topics["mail.workflow.read-mailbox"].metadata["help_contexts"], ["mail.list", "mail.mailbox"])
|
||||
self.assertEqual(topics["mail.workflow.read-mailbox"].metadata["help_contexts"], ["mail.list", "mail.mailbox", "mail.mailbox.reload", "mail.mailbox.tools"])
|
||||
self.assertIn("mail.admin.profiles", topics["mail.profiles-and-policy"].metadata["help_contexts"])
|
||||
self.assertIn("mail.bounce-processing", topics["mail.bounce-processing"].metadata["help_contexts"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user