test orgs 3

This commit is contained in:
lda
2026-05-07 14:59:20 +07:00 Verified
parent 54f3e9a739
commit f86331a6d1
6 changed files with 227 additions and 190 deletions
+24
View File
@@ -0,0 +1,24 @@
from __future__ import annotations
from wf_authoring import exists, expr, state_path
def test_condition_dsl_compiles_to_core_condition() -> None:
condition = expr(state_path("should_email")).eq(True) & exists(
state_path("summary")
)
assert condition.to_condition().model_dump() == {
"op": "and",
"args": [
{
"op": "eq",
"left": {"path": "state.should_email"},
"right": {"value": True},
},
{
"op": "exists",
"path": "state.summary",
},
],
}