def test_normalize_bugtask_status_from_BugTaskStatusSearchDisplay(self): expected = { BugTaskStatusSearchDisplay.CONFIRMED: BugTaskStatus.CONFIRMED, BugTaskStatusSearchDisplay.EXPIRED: BugTaskStatus.EXPIRED, BugTaskStatusSearchDisplay.FIXCOMMITTED: BugTaskStatus.FIXCOMMITTED, BugTaskStatusSearchDisplay.FIXRELEASED: BugTaskStatus.FIXRELEASED, BugTaskStatusSearchDisplay.INCOMPLETE_WITH_RESPONSE: BugTaskStatusSearch.INCOMPLETE_WITH_RESPONSE, BugTaskStatusSearchDisplay.INCOMPLETE_WITHOUT_RESPONSE: BugTaskStatusSearch.INCOMPLETE_WITHOUT_RESPONSE, BugTaskStatusSearchDisplay.INPROGRESS: BugTaskStatus.INPROGRESS, BugTaskStatusSearchDisplay.INVALID: BugTaskStatus.INVALID, BugTaskStatusSearchDisplay.NEW: BugTaskStatus.NEW, BugTaskStatusSearchDisplay.OPINION: BugTaskStatus.OPINION, BugTaskStatusSearchDisplay.TRIAGED: BugTaskStatus.TRIAGED, BugTaskStatusSearchDisplay.WONTFIX: BugTaskStatus.WONTFIX, } observed = dict((status, normalize_bugtask_status(status)) for status in BugTaskStatusSearchDisplay.items) self.assertEqual(expected, observed)
def test_normalize_bugtask_status_from_BugTaskStatus(self): expected = { BugTaskStatus.CONFIRMED: BugTaskStatus.CONFIRMED, BugTaskStatus.EXPIRED: BugTaskStatus.EXPIRED, BugTaskStatus.FIXCOMMITTED: BugTaskStatus.FIXCOMMITTED, BugTaskStatus.FIXRELEASED: BugTaskStatus.FIXRELEASED, BugTaskStatus.INCOMPLETE: BugTaskStatus.INCOMPLETE, BugTaskStatus.INPROGRESS: BugTaskStatus.INPROGRESS, BugTaskStatus.INVALID: BugTaskStatus.INVALID, BugTaskStatus.NEW: BugTaskStatus.NEW, BugTaskStatus.OPINION: BugTaskStatus.OPINION, BugTaskStatus.TRIAGED: BugTaskStatus.TRIAGED, BugTaskStatus.UNKNOWN: BugTaskStatus.UNKNOWN, BugTaskStatus.WONTFIX: BugTaskStatus.WONTFIX, } observed = dict((status, normalize_bugtask_status(status)) for status in BugTaskStatus.items) self.assertEqual(expected, observed)
def test_normalize_bugtask_status_from_BugTaskStatus(self): expected = { BugTaskStatus.CONFIRMED: BugTaskStatus.CONFIRMED, BugTaskStatus.EXPIRED: BugTaskStatus.EXPIRED, BugTaskStatus.FIXCOMMITTED: BugTaskStatus.FIXCOMMITTED, BugTaskStatus.FIXRELEASED: BugTaskStatus.FIXRELEASED, BugTaskStatus.INCOMPLETE: BugTaskStatus.INCOMPLETE, BugTaskStatus.INPROGRESS: BugTaskStatus.INPROGRESS, BugTaskStatus.INVALID: BugTaskStatus.INVALID, BugTaskStatus.NEW: BugTaskStatus.NEW, BugTaskStatus.OPINION: BugTaskStatus.OPINION, BugTaskStatus.TRIAGED: BugTaskStatus.TRIAGED, BugTaskStatus.UNKNOWN: BugTaskStatus.UNKNOWN, BugTaskStatus.WONTFIX: BugTaskStatus.WONTFIX, } observed = dict( (status, normalize_bugtask_status(status)) for status in BugTaskStatus.items) self.assertEqual(expected, observed)
def test_normalize_bugtask_status_from_BugTaskStatusSearchDisplay(self): expected = { BugTaskStatusSearchDisplay.CONFIRMED: BugTaskStatus.CONFIRMED, BugTaskStatusSearchDisplay.EXPIRED: BugTaskStatus.EXPIRED, BugTaskStatusSearchDisplay.FIXCOMMITTED: BugTaskStatus.FIXCOMMITTED, BugTaskStatusSearchDisplay.FIXRELEASED: BugTaskStatus.FIXRELEASED, BugTaskStatusSearchDisplay.INCOMPLETE_WITH_RESPONSE: BugTaskStatusSearch.INCOMPLETE_WITH_RESPONSE, BugTaskStatusSearchDisplay.INCOMPLETE_WITHOUT_RESPONSE: BugTaskStatusSearch.INCOMPLETE_WITHOUT_RESPONSE, BugTaskStatusSearchDisplay.INPROGRESS: BugTaskStatus.INPROGRESS, BugTaskStatusSearchDisplay.INVALID: BugTaskStatus.INVALID, BugTaskStatusSearchDisplay.NEW: BugTaskStatus.NEW, BugTaskStatusSearchDisplay.OPINION: BugTaskStatus.OPINION, BugTaskStatusSearchDisplay.TRIAGED: BugTaskStatus.TRIAGED, BugTaskStatusSearchDisplay.WONTFIX: BugTaskStatus.WONTFIX, } observed = dict( (status, normalize_bugtask_status(status)) for status in BugTaskStatusSearchDisplay.items) self.assertEqual(expected, observed)