32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
from __future__ import annotations
|
|
|
|
import unittest
|
|
|
|
from govoplan_core.core.modules import (
|
|
documentation_structured_translation_issues,
|
|
user_workflow_scope_condition_issues,
|
|
)
|
|
from govoplan_payments.backend.manifest import manifest
|
|
|
|
|
|
class PaymentsDocumentationTests(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_documentation_has_scope_conditioned_workflow_and_reference(self) -> None:
|
|
kinds = {topic.metadata.get("kind") for topic in manifest.documentation}
|
|
self.assertIn("workflow", kinds)
|
|
self.assertIn("reference", kinds)
|
|
for topic in manifest.documentation:
|
|
self.assertEqual((), user_workflow_scope_condition_issues(topic))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|