28 lines
873 B
Python
28 lines
873 B
Python
from __future__ import annotations
|
|
|
|
import unittest
|
|
|
|
from govoplan_services.backend.manifest import manifest
|
|
|
|
|
|
class ServicesDocumentationTests(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"))
|
|
)
|
|
|
|
def test_catalogue_topic_is_the_field_and_consequence_reference(self) -> None:
|
|
topic = next(
|
|
item
|
|
for item in manifest.documentation
|
|
if item.id == "services.catalogue"
|
|
)
|
|
self.assertEqual("reference", topic.metadata.get("kind"))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|