Files
govoplan-connectors/tests/test_manifest.py
T

48 lines
1.5 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
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},
)
if __name__ == "__main__":
unittest.main()