44 lines
1.4 KiB
Python
44 lines
1.4 KiB
Python
from __future__ import annotations
|
|
|
|
import unittest
|
|
|
|
from govoplan_core.core.identity_trust import (
|
|
CAPABILITY_IDENTITY_TRUST_ASSURANCE,
|
|
CAPABILITY_IDENTITY_TRUST_DIRECTORY,
|
|
)
|
|
from govoplan_identity_trust.backend.manifest import get_manifest
|
|
|
|
|
|
class IdentityTrustManifestTests(unittest.TestCase):
|
|
def test_manifest_exposes_headless_trust_capabilities(self) -> None:
|
|
manifest = get_manifest()
|
|
self.assertEqual("identity_trust", manifest.id)
|
|
self.assertEqual((), manifest.dependencies)
|
|
self.assertIn(
|
|
CAPABILITY_IDENTITY_TRUST_DIRECTORY,
|
|
manifest.capability_factories,
|
|
)
|
|
self.assertIn(
|
|
CAPABILITY_IDENTITY_TRUST_ASSURANCE,
|
|
manifest.capability_factories,
|
|
)
|
|
self.assertIsNotNone(manifest.frontend)
|
|
self.assertEqual(
|
|
"@govoplan/identity-trust-webui",
|
|
manifest.frontend.package_name,
|
|
)
|
|
self.assertIn(
|
|
"identity_trust.settings.devices",
|
|
{surface.id for surface in manifest.frontend.view_surfaces},
|
|
)
|
|
self.assertIn(
|
|
"identity_trust:assurance:read",
|
|
{permission.scope for permission in manifest.permissions},
|
|
)
|
|
self.assertIsNotNone(manifest.migration_spec)
|
|
self.assertEqual("vertical_slice", manifest.architecture.maturity)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|