|
@@ -576,7 +576,7 @@ async def test_process_event_simple(test_state):
|
|
assert test_state.num1 == 0
|
|
assert test_state.num1 == 0
|
|
|
|
|
|
event = Event(token="t", name="set_num1", payload={"value": 69})
|
|
event = Event(token="t", name="set_num1", payload={"value": 69})
|
|
- update = await test_state.process(event)
|
|
|
|
|
|
+ update = await test_state._process(event)
|
|
|
|
|
|
# The event should update the value.
|
|
# The event should update the value.
|
|
assert test_state.num1 == 69
|
|
assert test_state.num1 == 69
|
|
@@ -601,7 +601,7 @@ async def test_process_event_substate(test_state, child_state, grandchild_state)
|
|
event = Event(
|
|
event = Event(
|
|
token="t", name="child_state.change_both", payload={"value": "hi", "count": 12}
|
|
token="t", name="child_state.change_both", payload={"value": "hi", "count": 12}
|
|
)
|
|
)
|
|
- update = await test_state.process(event)
|
|
|
|
|
|
+ update = await test_state._process(event)
|
|
assert child_state.value == "HI"
|
|
assert child_state.value == "HI"
|
|
assert child_state.count == 24
|
|
assert child_state.count == 24
|
|
assert update.delta == {
|
|
assert update.delta == {
|
|
@@ -616,7 +616,7 @@ async def test_process_event_substate(test_state, child_state, grandchild_state)
|
|
name="child_state.grandchild_state.set_value2",
|
|
name="child_state.grandchild_state.set_value2",
|
|
payload={"value": "new"},
|
|
payload={"value": "new"},
|
|
)
|
|
)
|
|
- update = await test_state.process(event)
|
|
|
|
|
|
+ update = await test_state._process(event)
|
|
assert grandchild_state.value2 == "new"
|
|
assert grandchild_state.value2 == "new"
|
|
assert update.delta == {
|
|
assert update.delta == {
|
|
"test_state.child_state.grandchild_state": {"value2": "new"},
|
|
"test_state.child_state.grandchild_state": {"value2": "new"},
|