Files
govoplan-connectors/tests/test_manifest.py
T
zemion 79e2315e89
Module Package Release / publish-packages (push) Successful in 12s
Release Connectors v0.1.21 with external knowledge integration
2026-08-22 14:34:36 +02:00

73 lines
2.4 KiB
Python

from __future__ import annotations
import unittest
from govoplan_core.core.tabular_sources import (
CAPABILITY_CONNECTORS_TABULAR_SNAPSHOT_WRITER,
CAPABILITY_CONNECTORS_TABULAR_SOURCES,
)
from govoplan_core.core.sanctions import (
CAPABILITY_CONNECTORS_SANCTIONS_SNAPSHOTS,
)
from govoplan_connectors.backend.manifest import manifest
from govoplan_connectors.backend.knowledge_connector import (
KNOWLEDGE_CAPABILITY,
KNOWLEDGE_PROVIDER_ID,
)
class ConnectorsManifestTests(unittest.TestCase):
def test_manifest_exposes_versioned_tabular_capabilities(self) -> None:
self.assertEqual("connectors", manifest.id)
self.assertIn("access", manifest.optional_dependencies)
self.assertIn(
"connectors.tabular_sources",
{interface.name for interface in manifest.provides_interfaces},
)
self.assertIn(
CAPABILITY_CONNECTORS_TABULAR_SOURCES,
manifest.capability_factories,
)
self.assertIn(
CAPABILITY_CONNECTORS_TABULAR_SNAPSHOT_WRITER,
manifest.capability_factories,
)
self.assertIn(
CAPABILITY_CONNECTORS_SANCTIONS_SNAPSHOTS,
manifest.capability_factories,
)
self.assertIsNotNone(manifest.migration_spec)
self.assertEqual(
"@govoplan/connectors-webui",
manifest.frontend.package_name,
)
self.assertIn(
"connectors.governed-configuration",
{topic.id for topic in manifest.documentation},
)
self.assertIn(KNOWLEDGE_CAPABILITY, manifest.capability_factories)
self.assertIn(
KNOWLEDGE_CAPABILITY,
{interface.name for interface in manifest.provides_interfaces},
)
self.assertIn("search", manifest.optional_dependencies)
self.assertIn("wiki", manifest.optional_dependencies)
self.assertIn(
KNOWLEDGE_PROVIDER_ID,
{provider.id for provider in manifest.external_providers},
)
self.assertIn(
KNOWLEDGE_PROVIDER_ID,
{registration.id for registration in manifest.search_sources},
)
topic = next(
item
for item in manifest.documentation
if item.id == "connectors.mediawiki-bluespice"
)
self.assertIn("de", topic.translations)
if __name__ == "__main__":
unittest.main()