MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / test_roundtrip

Method test_roundtrip

tests/test_scene_store.py:54–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

52
53class TestSerialization:
54 def test_roundtrip(self):
55 scene = SceneConfig(
56 name="intimate",
57 primary="anthropic/claude-opus-4.6",
58 fallback=["anthropic/claude-sonnet-4.6"],
59 hard_pin=True,
60 description="Private chat with BB",
61 tier_floor=Tier.COMPLEX,
62 )
63 data = _serialize_scene(scene)
64 restored = _deserialize_scene(data)
65 assert restored is not None
66 assert restored.name == "intimate"
67 assert restored.primary == "anthropic/claude-opus-4.6"
68 assert restored.hard_pin is True
69 assert restored.tier_floor == Tier.COMPLEX
70
71 def test_deserialize_invalid_returns_none(self):
72 assert _deserialize_scene({}) is None

Callers

nothing calls this directly

Calls 3

SceneConfigClass · 0.90
_serialize_sceneFunction · 0.90
_deserialize_sceneFunction · 0.90

Tested by

no test coverage detected