move to new version
This commit is contained in:
@@ -68,6 +68,18 @@ class GuiProfileCodecTest(unittest.TestCase):
|
||||
with self.assertRaises(ValueError): # combos_text must be a JSON string, not a number
|
||||
GuiProfileModel.from_dict({"gui": {"switches": {"combos_text": 123}}})
|
||||
|
||||
def test_invalid_gpr_timing_mode_is_rejected(self) -> None:
|
||||
with self.assertRaisesRegex(ValueError, "timing_mode"):
|
||||
GuiProfileModel.from_dict({"gui": {"processing": {"gpr": {"timing_mode": "bogus"}}}})
|
||||
|
||||
def test_invalid_gpr_plane_mode_is_rejected(self) -> None:
|
||||
with self.assertRaisesRegex(ValueError, "plane_mode"):
|
||||
GuiProfileModel.from_dict({"gui": {"processing": {"gpr": {"plane_mode": "bogus"}}}})
|
||||
|
||||
def test_invalid_gpr_tx_per_segment_is_rejected(self) -> None:
|
||||
with self.assertRaisesRegex(ValueError, "tx_per_segment"):
|
||||
GuiProfileModel.from_dict({"gui": {"processing": {"gpr": {"tx_per_segment": 0}}}})
|
||||
|
||||
def test_legacy_gpr_payload_migrates_selected_mode(self) -> None:
|
||||
# An old payload that selects 'gpr' but carries a legacy root gpr.mode is migrated.
|
||||
decoded = GuiProfileModel.from_dict({
|
||||
|
||||
Reference in New Issue
Block a user