Kill the surviving mutants of the repo split and the epic comment
CI / tests (pull_request) Has been cancelled
CI / tests (pull_request) Has been cancelled
This commit is contained in:
@@ -24,9 +24,10 @@ class MemoryEpicContract(EpicStoreContract, unittest.TestCase):
|
||||
|
||||
|
||||
class Failing(unittest.TestCase):
|
||||
def test_every_read_and_filing_fails_with_the_reason_given(self) -> None:
|
||||
def test_every_read_filing_label_and_comment_fails_with_the_reason_given(self) -> None:
|
||||
store = MemoryEpic("ABC-12", fails="Jira is down")
|
||||
self.assertEqual((store.read(), store.file("ABC-12", "Count the runs.", "", ())), (Failure("Jira is down"), Failure("Jira is down")))
|
||||
down = Failure("Jira is down")
|
||||
self.assertEqual((store.read(), store.file("ABC-12", "Count the runs.", "", ()), store.add_label("ABC-100", "api"), store.comment("ABC-100", "Hello.")), (down, down, down, down))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -212,6 +212,13 @@ class Jira(Case):
|
||||
refusing = JiraEpic(EPIC, self.env_file, self.jira, to_markdown, lambda text: Failure("not markdown"))
|
||||
self.assertEqual(refusing.comment(key, "Hello."), Failure("cannot convert the comment to a Jira comment: not markdown"))
|
||||
|
||||
def test_an_issue_jira_cannot_read_is_not_commented_on(self) -> None:
|
||||
store = self.new_store()
|
||||
key = store.file("ABC-12", "Count the runs.", "", ())
|
||||
self.jira.answers[("GET", f"{ISSUES}/{key}?fields=parent")] = Failure("Jira answered 500")
|
||||
self.assertEqual(store.comment(str(key), "Hello."), Failure(f"cannot read {key} to comment on it: Jira answered 500"))
|
||||
self.assertNotIn(("POST", f"{ISSUES}/{key}/comment"), self.jira.calls)
|
||||
|
||||
def test_an_issue_jira_cannot_read_is_not_labelled(self) -> None:
|
||||
store = self.new_store()
|
||||
key = store.file("ABC-12", "Count the runs.", "", ())
|
||||
|
||||
Reference in New Issue
Block a user