예제 #1
0
def test_get_priority_respect_false():
    """
    We should accept False as a priority-worthy value.

    False should be able to be specified and respected as non-None.
    """
    target = False
    actual = config.get_priority(False, 'second', 'third')
    assert_equal(target, actual)
예제 #2
0
파일: config_test.py 프로젝트: jiajie999/eg
def test_get_priority_respect_false():
    """
    We should accept False as a priority-worthy value.

    False should be able to be specified and respected as non-None.
    """
    target = False
    actual = config.get_priority(False, 'second', 'third')
    assert_equal(target, actual)
예제 #3
0
def test_get_priority_third():
    """The last should be taken if the first two are None."""
    target = 'gamma'
    actual = config.get_priority(None, None, target)
    assert_equal(target, actual)
예제 #4
0
def test_get_priority_second():
    """The second non-None should be returned if the first is None."""
    target = 'beta'
    actual = config.get_priority(None, target, 'third')
    assert_equal(target, actual)
예제 #5
0
def test_get_priority_first():
    """The first non-None value should always be returned."""
    target = 'alpha'
    actual = config.get_priority(target, 'second', 'third')
    assert_equal(target, actual)
예제 #6
0
파일: config_test.py 프로젝트: jiajie999/eg
def test_get_priority_third():
    """The last should be taken if the first two are None."""
    target = 'gamma'
    actual = config.get_priority(None, None, target)
    assert_equal(target, actual)
예제 #7
0
파일: config_test.py 프로젝트: jiajie999/eg
def test_get_priority_second():
    """The second non-None should be returned if the first is None."""
    target = 'beta'
    actual = config.get_priority(None, target, 'third')
    assert_equal(target, actual)
예제 #8
0
파일: config_test.py 프로젝트: jiajie999/eg
def test_get_priority_first():
    """The first non-None value should always be returned."""
    target = 'alpha'
    actual = config.get_priority(target, 'second', 'third')
    assert_equal(target, actual)