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)
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)
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)
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)