(self)
| 52 | |
| 53 | class 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 |
nothing calls this directly
no test coverage detected