Test the fake's rank refusals and a refused rank after the last issue
CI / tests (pull_request) Successful in 3m9s
CI / tests (pull_request) Successful in 3m9s
This commit is contained in:
@@ -35,9 +35,16 @@ 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_and_rank_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")))
|
||||
self.assertEqual((store.read(), store.file("ABC-12", "Count the runs.", "", ()), store.rank("ABC-100", "ABC-101")), (Failure("Jira is down"),) * 3)
|
||||
|
||||
|
||||
class Ranking(unittest.TestCase):
|
||||
def test_refuses_to_rank_beside_an_issue_that_isnt_a_child_of_the_epic(self) -> None:
|
||||
store = MemoryEpic("ABC-12")
|
||||
child = store.file("ABC-12", "Count the runs.", "", ())
|
||||
self.assertEqual(store.rank(str(child), "ZZZ-1"), Failure("ZZZ-1 is not one of the child issues of the epic ABC-12, so it cannot be ranked"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user