Files
govoplan-encryption/tests/test_manifest.py
T

37 lines
1.2 KiB
Python

from __future__ import annotations
import unittest
from govoplan_core.core.encryption import (
CAPABILITY_ENCRYPTION_CONTENT_PROTECTION,
CAPABILITY_ENCRYPTION_DISABLE_PREFLIGHT,
CAPABILITY_ENCRYPTION_KEY_VAULT,
CAPABILITY_ENCRYPTION_RECOVERY,
)
from govoplan_encryption.backend.manifest import get_manifest
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_RECOVERY,
CAPABILITY_ENCRYPTION_DISABLE_PREFLIGHT,
},
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()