File findings, release reviews and added items as the issue types the settings name, and refuse a type the Jira project lacks

This commit is contained in:
Lilleman
2026-11-20 11:31:44 +01:00
parent 88fee92dcb
commit 34328b11b9
15 changed files with 179 additions and 30 deletions
+17
View File
@@ -123,6 +123,23 @@ class ConfigTest(unittest.TestCase):
assert isinstance(found, DoEpicConfig), found
self.assertEqual((found.unblocking, found.automation_moves), (("Release Ready", "Done"), True))
def test_reads_the_issue_types_of_a_finding_and_a_release_review_which_are_task_where_left_out(self) -> None:
self.write()
found = load(self.home)
assert isinstance(found, DoEpicConfig), found
self.assertEqual((found.finding_type, found.review_type), ("Task", "Task"))
self.write(SETTINGS + 'jira-finding-type = "Feature"\njira-review-type = "Chore"\n')
found = load(self.home)
assert isinstance(found, DoEpicConfig), found
self.assertEqual((found.finding_type, found.review_type), ("Feature", "Chore"))
def test_refuses_an_issue_type_that_is_no_name(self) -> None:
for setting, example in (("jira-finding-type", "Feature"), ("jira-review-type", "Chore")):
for value in ("4", '" "'):
with self.subTest(setting=setting, value=value):
self.write(SETTINGS + f"{setting} = {value}\n")
self.assertIn(f'`{setting}` is {4 if value == "4" else repr(" ")}, not the name Jira shows, such as "{example}"', self.failure())
def test_refuses_unblocking_statuses_that_are_no_list_of_names_and_a_switch_that_is_no_boolean(self) -> None:
for value in ('"Done"', '["Done", " "]', "[]", "[1]"):
with self.subTest(value=value):