30 lines
1.0 KiB
Python
30 lines
1.0 KiB
Python
from __future__ import annotations
|
|
|
|
import unittest
|
|
|
|
from govoplan_core.core.modules import documentation_structured_translation_issues
|
|
from govoplan_mandates.backend.manifest import manifest
|
|
|
|
|
|
class MandatesDocumentationTests(unittest.TestCase):
|
|
def test_public_topics_have_complete_german_reference_content(self) -> None:
|
|
self.assertEqual(2, len(manifest.documentation))
|
|
for topic in manifest.documentation:
|
|
translation = topic.translations.get("de", {})
|
|
self.assertTrue(
|
|
all(translation.get(key) for key in ("title", "summary", "body"))
|
|
)
|
|
self.assertEqual((), documentation_structured_translation_issues(topic))
|
|
|
|
def test_definition_topic_is_the_field_and_consequence_reference(self) -> None:
|
|
topic = next(
|
|
item
|
|
for item in manifest.documentation
|
|
if item.id == "mandates.definition-and-resolution"
|
|
)
|
|
self.assertEqual("reference", topic.metadata.get("kind"))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|