fix: a recorded region is the same choice

This commit is contained in:
Abdessamad Derraz committed 2026-11-24 03:38:59 +01:00
1 parent 9feee29318
commit e7b9acb425
6 files changed
+45 -18

No files matched your search

+8
View File
@@ -1389,6 +1389,14 @@ class RecordedPlan(unittest.TestCase):
self.assertEqual(record_state(record_setup(
["--region", "us", "--region", "zz"])).regions, ["north-america"])
def test_a_recorded_region_is_the_same_choice_on_screen(self):
"""The screen spells regions as the manifests do and joins them: the
record's own words are still its choice, in their order."""
state = record_state(record_setup(["--region", "us", "--region", "jp"]))
self.assertTrue(install.tui_record_kept(state))
self.assertNotEqual(install._record_key([("--region", "us,jp")]),
install._record_key([("--region", "jp,us")]))
def test_opens_on_the_plan_of_the_one_setup_found(self):
state = record_state()
self.assertTrue(state.opened_on_plan)