from __future__ import annotations import unittest from govoplan_core.core.encryption import ( CAPABILITY_ENCRYPTION_CONTENT_CIPHER, CAPABILITY_ENCRYPTION_CONTENT_CIPHER_PROVIDER_PREFIX, CAPABILITY_ENCRYPTION_CONTENT_PROTECTION, CAPABILITY_ENCRYPTION_DISABLE_PREFLIGHT, CAPABILITY_ENCRYPTION_KEY_MATERIAL_PROVIDER_PREFIX, CAPABILITY_ENCRYPTION_KEY_VAULT, CAPABILITY_ENCRYPTION_RECOVERY, ) from govoplan_encryption.backend.manifest import get_manifest from govoplan_encryption.backend.local_provider import LOCAL_PROVIDER_ID class EncryptionManifestTests(unittest.TestCase): def test_manifest_exposes_headless_governed_capabilities(self) -> None: manifest = get_manifest() self.assertEqual("encryption", manifest.id) self.assertEqual((), manifest.dependencies) self.assertEqual( { CAPABILITY_ENCRYPTION_KEY_VAULT, CAPABILITY_ENCRYPTION_CONTENT_PROTECTION, CAPABILITY_ENCRYPTION_CONTENT_CIPHER, CAPABILITY_ENCRYPTION_RECOVERY, CAPABILITY_ENCRYPTION_DISABLE_PREFLIGHT, f"{CAPABILITY_ENCRYPTION_KEY_MATERIAL_PROVIDER_PREFIX}{LOCAL_PROVIDER_ID}", f"{CAPABILITY_ENCRYPTION_CONTENT_CIPHER_PROVIDER_PREFIX}{LOCAL_PROVIDER_ID}", }, set(manifest.capability_factories), ) self.assertIsNotNone(manifest.route_factory) self.assertIsNotNone(manifest.migration_spec) self.assertIsNone(manifest.frontend) self.assertEqual("vertical_slice", manifest.architecture.maturity) if __name__ == "__main__": unittest.main()