Exemple #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)
Exemple #2
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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #6
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)
Exemple #7
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)
Exemple #8
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)