feat: add reusable workflow definition graphs

This commit is contained in:
2026-07-28 12:43:26 +02:00
parent 0d099b05b7
commit 85eef00913
13 changed files with 972 additions and 3 deletions

32
tests/test_manifest.py Normal file
View File

@@ -0,0 +1,32 @@
from __future__ import annotations
import unittest
from govoplan_workflow.backend.manifest import (
DEFINITION_READ_SCOPE,
DEFINITION_WRITE_SCOPE,
get_manifest,
)
class WorkflowManifestTests(unittest.TestCase):
def test_manifest_exposes_definition_contracts(self) -> None:
manifest = get_manifest()
self.assertEqual(manifest.id, "workflow")
self.assertIn(
"workflow.definition_graph",
{item.name for item in manifest.provides_interfaces},
)
self.assertIn(
DEFINITION_READ_SCOPE,
{item.scope for item in manifest.permissions},
)
self.assertIn(
DEFINITION_WRITE_SCOPE,
{item.scope for item in manifest.permissions},
)
if __name__ == "__main__":
unittest.main()