def test_sort_by_priority(): ### At this point we've tested get_status_type() so we can use it. test.eq_(ck.get_status_type(ck.sort_by_priority(STATUS_CASES)[0]), 'err')
def test_highest_priority(): ### At this point we've tested get_status_type() so we can use it. test.eq_(ck.get_status_type(ck.highest_priority(STATUS_CASES)), 'err')
def test_get_status_type(): results = ['ok', 'warn', 'err', False, False, False] for line, expected in zip(STATUS_CASES, results): test.eq_(ck.get_status_type(line), expected) for line, exc in STATUS_EXCEPTIONS: test.assert_raises(exc, ck.get_status_type, line)