コード例 #1
0
ファイル: test_cloudkick.py プロジェクト: krux/monitorlib
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')
コード例 #2
0
ファイル: test_cloudkick.py プロジェクト: krux/monitorlib
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')
コード例 #3
0
ファイル: test_cloudkick.py プロジェクト: krux/monitorlib
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)