feat: add workflow graph constraints fixtures

This commit is contained in:
Abhishek Kumar 2026-05-08 16:02:51 +05:30
parent 6d93be3ef6
commit 5a358d4d29
38 changed files with 447 additions and 49 deletions

View file

@ -4,14 +4,14 @@ import pytest
from api.services.workflow.dto import ReactFlowDTO, sanitize_workflow_definition
_FIXTURES_DIR = Path(__file__).parent / "definitions"
_FIXTURES_DIR = Path(__file__).parent / "dto_fixtures"
@pytest.mark.asyncio
async def test_dto():
# Path resolved relative to this test file so the test works regardless
# of the cwd pytest is invoked from.
with open(_FIXTURES_DIR / "rf-1.json", "r") as f:
with open(_FIXTURES_DIR / "sample_branching_workflow.json", "r") as f:
dto = ReactFlowDTO.model_validate_json(f.read())
assert dto is not None