Answer stability round 1: 0 🔴, 3 🟡 (0 misread); read the issue types in one place, skip the epic type, and say what todo-item add files

This commit is contained in:
Lilleman
2026-11-20 13:40:07 +01:00
parent 98d1fc1eba
commit 3d3f8c9a66
7 changed files with 51 additions and 37 deletions
+3 -3
View File
@@ -310,9 +310,9 @@ class Jira(Case):
store.file("ABC-12", "Review api.", "", ("repo:api", REVIEW_LABEL))
self.assertEqual(self.jira.filed_as, [{"name": "Feature"}, {"name": "Chore"}])
def test_files_nothing_where_the_project_lacks_the_type_and_names_the_types_it_has(self) -> None:
def test_does_not_file_anything_where_the_project_lacks_the_type_and_names_the_types_it_has(self) -> None:
store = JiraEpic(EPIC, self.env_file, self.jira, to_markdown, to_adf, finding_type="Feature", review_type="Investigation")
self.assertEqual(store.file("ABC-12", "Review api.", "", (REVIEW_LABEL,)), Failure("ABC has no issue type 'Investigation' to file an issue under an epic as; its types are Task, Feature and Chore"))
self.assertEqual(store.file("ABC-12", "Review api.", "", (REVIEW_LABEL,)), Failure("ABC has no issue type 'Investigation' for an issue under an epic; it has Task, Feature and Chore: name one in `jira-review-type`"))
self.assertEqual(self.jira.issues, [])
def test_a_filing_jira_fails_or_answers_without_a_key_says_the_issue_may_exist(self) -> None:
@@ -329,7 +329,7 @@ class Jira(Case):
def test_files_no_sub_task_where_the_project_has_no_sub_task_type_or_its_types_cannot_be_read(self) -> None:
store = self.new_store()
child = store.file("ABC-12", "Count the runs.", "", ())
for answer, reason in ((Failure("Jira answered 403"), "cannot read ABC's issue types: Jira answered 403"), ({"issueTypes": [{"id": "10001", "subtask": False}]}, "ABC has no sub-task issue type; turn sub-tasks on in Jira"), ({}, "Jira answered ABC's issue types in a shape its REST API version 3 doesn't document"), ([], "Jira answered ABC's issue types in a shape its REST API version 3 doesn't document")):
for answer, reason in ((Failure("Jira answered 403"), "cannot read ABC's issue types: Jira answered 403"), ({"issueTypes": [{"id": "10001", "name": "Task", "subtask": False}]}, "ABC has no sub-task issue type; turn sub-tasks on in Jira"), ({}, "Jira answered ABC's issue types in a shape its REST API version 3 doesn't document"), ([], "Jira answered ABC's issue types in a shape its REST API version 3 doesn't document")):
with self.subTest(answer=answer):
self.jira.answers[("GET", ISSUE_TYPES)] = answer
self.assertEqual(store.file(str(child), "A task.", "", ()), Failure(reason))