Beispiel #1
0
 def test_get_story_tags_without_matches(self):
     """
     L{Bug.get_story_tags} returns an empty list if no tags start with
     C{story-}.
     """
     now = datetime.utcnow()
     bug = Bug("1", "kanban", MEDIUM, IN_PROGRESS, "A title", "jkakar", now,
               "branch_url", "merge_url", NEEDS_REVIEW, now, ["test"])
     self.assertEqual([], bug.get_story_tags())
Beispiel #2
0
 def test_get_story_tags(self):
     """
     L{Bug.get_story_tags} returns the list of tags that start with
     C{story-}.
     """
     now = datetime.utcnow()
     bug = Bug("1", "kanban", MEDIUM, IN_PROGRESS, "A title", "jkakar", now,
               "branch_url", "merge_url", NEEDS_REVIEW, now,
               ["test", "story-test"])
     self.assertEqual(["story-test"], bug.get_story_tags())
Beispiel #3
0
 def test_queued_with_triaged_status(self):
     """A L{Bug} with a L{TRIAGED} status is in the 'Queued' category."""
     bug = Bug("1", "kanban", MEDIUM, TRIAGED, "A title")
     self.assertTrue(bug.queued())
     self.assertFalse(bug.in_progress())
     self.assertFalse(bug.needs_review())
     self.assertFalse(bug.needs_testing())
     self.assertFalse(bug.needs_release())
     self.assertFalse(bug.released())
Beispiel #4
0
 def test_released(self):
     """
     A L{Bug} with a L{FIX_RELEASED} status is in the 'Released' category.
     """
     bug = Bug("1", "kanban", MEDIUM, FIX_RELEASED, "A title")
     self.assertFalse(bug.queued())
     self.assertFalse(bug.in_progress())
     self.assertFalse(bug.needs_review())
     self.assertFalse(bug.needs_testing())
     self.assertFalse(bug.needs_release())
     self.assertTrue(bug.released())
Beispiel #5
0
 def test_needs_testing_fix_committed_without_merge_proposal(self):
     """
     A L{Bug} with an L{FIX_COMMITTED} status not linked to a merge
     proposal is in the 'Needs testing' category.
     """
     bug = Bug("1", "kanban", MEDIUM, FIX_COMMITTED, "A title")
     self.assertFalse(bug.queued())
     self.assertFalse(bug.in_progress())
     self.assertFalse(bug.needs_review())
     self.assertTrue(bug.needs_testing())
     self.assertFalse(bug.needs_release())
     self.assertFalse(bug.released())
Beispiel #6
0
 def test_in_progress(self):
     """
     A L{Bug} with an L{IN_PROGRESS} status is in the 'In progress'
     category.
     """
     bug = Bug("1", "kanban", MEDIUM, IN_PROGRESS, "A title")
     self.assertFalse(bug.queued())
     self.assertTrue(bug.in_progress())
     self.assertFalse(bug.needs_review())
     self.assertFalse(bug.needs_testing())
     self.assertFalse(bug.needs_release())
     self.assertFalse(bug.released())
Beispiel #7
0
 def test_needs_testing_in_progress_with_merged_merge_proposal(self):
     """
     A L{Bug} with an L{IN_PROGRESS} status linked to a merge proposal with
     an L{APPROVED} status is in the 'Needs testing' category.
     """
     bug = Bug("1", "kanban", MEDIUM, IN_PROGRESS, "A title",
               merge_proposal="url", merge_proposal_status=MERGED)
     self.assertFalse(bug.queued())
     self.assertFalse(bug.in_progress())
     self.assertFalse(bug.needs_review())
     self.assertTrue(bug.needs_testing())
     self.assertFalse(bug.needs_release())
     self.assertFalse(bug.released())
Beispiel #8
0
 def test_needs_review(self):
     """
     A L{Bug} with an L{IN_PROGRESS} status and a merge proposal with a
     L{NEEDS_REVIEW} status is in the 'Needs review' category.
     """
     bug = Bug("1", "kanban", MEDIUM, IN_PROGRESS, "A title",
               merge_proposal="url", merge_proposal_status=NEEDS_REVIEW)
     self.assertFalse(bug.queued())
     self.assertFalse(bug.in_progress())
     self.assertTrue(bug.needs_review())
     self.assertFalse(bug.needs_testing())
     self.assertFalse(bug.needs_release())
     self.assertFalse(bug.released())
Beispiel #9
0
 def test_in_progress_with_work_in_progress_merge_proposal(self):
     """
     A L{Bug} with an L{IN_PROGRESS} status that has a merge proposal with
     a L{NEEDS_REVIEW} status is in the 'In progress' category.
     """
     bug = Bug("1", "kanban", MEDIUM, IN_PROGRESS, "A title",
               merge_proposal="url", merge_proposal_status=WORK_IN_PROGRESS)
     self.assertFalse(bug.queued())
     self.assertTrue(bug.in_progress())
     self.assertFalse(bug.needs_review())
     self.assertFalse(bug.needs_testing())
     self.assertFalse(bug.needs_release())
     self.assertFalse(bug.released())
Beispiel #10
0
 def test_needs_release_without_merge_proposal(self):
     """
     A L{Bug} with a L{FIX_COMMITTED} status that is not linked to a merge
     proposal, but has the C{verified} tag is in the 'Needs release'
     category.
     """
     bug = Bug("1", "kanban", MEDIUM, FIX_COMMITTED, "A title",
               branch="branch_url", tags=["verified"])
     self.assertFalse(bug.queued())
     self.assertFalse(bug.in_progress())
     self.assertFalse(bug.needs_review())
     self.assertFalse(bug.needs_testing())
     self.assertTrue(bug.needs_release())
     self.assertFalse(bug.released())
Beispiel #11
0
 def test_needs_release(self):
     """
     A L{Bug} with a L{FIX_COMMITTED} status linked to a merge proposal
     with an L{MERGED} status and the C{verified} tag is in the
     'Needs release' category.
     """
     bug = Bug("1", "kanban", MEDIUM, FIX_COMMITTED, "A title",
               merge_proposal="url", merge_proposal_status=MERGED,
               tags=["verified"])
     self.assertFalse(bug.queued())
     self.assertFalse(bug.in_progress())
     self.assertFalse(bug.needs_review())
     self.assertFalse(bug.needs_testing())
     self.assertTrue(bug.needs_release())
     self.assertFalse(bug.released())