docs(organizations): complete German reference coverage
Module Package Release / publish-packages (push) Successful in 13s

This commit is contained in:
2026-08-23 19:31:24 +02:00
parent 9f17de7a3f
commit 4408a9486f
6 changed files with 118 additions and 6 deletions
@@ -2,6 +2,10 @@ from __future__ import annotations
import unittest
from govoplan_core.core.modules import (
documentation_structured_translation_issues,
localizable_documentation_metadata_keys,
)
from govoplan_organizations.backend.manifest import manifest
@@ -39,6 +43,25 @@ class OrganizationsInterfaceDocumentationContractTests(unittest.TestCase):
)
self.assertIn("hierarchy_change", reference.metadata["consequence_classes"])
def test_german_reference_documentation_is_complete(self) -> None:
topics = manifest.documentation
self.assertEqual(4, len(topics))
for topic in topics:
translation = topic.translations.get("de", {})
self.assertTrue(translation.get("title"), topic.id)
self.assertTrue(translation.get("summary"), topic.id)
self.assertTrue(translation.get("body"), topic.id)
if localizable_documentation_metadata_keys(topic):
self.assertEqual("1", topic.structured_translation_version, topic.id)
self.assertIn("de", topic.structured_translations, topic.id)
self.assertEqual((), documentation_structured_translation_issues(topic))
kinds = {topic.metadata.get("kind") for topic in topics}
self.assertIn("workflow", kinds)
self.assertIn("reference", kinds)
workflow = next(topic for topic in topics if topic.metadata.get("kind") == "workflow")
self.assertTrue(workflow.conditions)
if __name__ == "__main__":
unittest.main()