feat: checkpoint device agent runtime milestones
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from semantic.models import SemanticScene, SemanticWidget
|
||||
|
||||
|
||||
def test_semantic_scene_round_trips_through_dict() -> None:
|
||||
scene = SemanticScene(
|
||||
page="Chat",
|
||||
intents=["send a message", "open attachments"],
|
||||
widgets=[
|
||||
SemanticWidget(element_id="input", purpose="message text input"),
|
||||
SemanticWidget(element_id="send", purpose="send message"),
|
||||
],
|
||||
)
|
||||
|
||||
restored = SemanticScene.from_dict(scene.to_dict())
|
||||
|
||||
assert restored == scene
|
||||
assert restored.to_dict() == {
|
||||
"page": "Chat",
|
||||
"intents": ["send a message", "open attachments"],
|
||||
"widgets": [
|
||||
{"element_id": "input", "purpose": "message text input"},
|
||||
{"element_id": "send", "purpose": "send message"},
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user