def test_get_previous_release_ho_history(list_releases): releases = [] list_releases.return_value = releases assert get_previous_release(None) is None assert get_previous_release('xxx') is None
def test_get_previous_release(list_releases): releases = [ 'aaa', 'bbb', 'ccc', 'ddd', ] list_releases.return_value = releases assert get_previous_release('ccc') == 'bbb' assert get_previous_release(None) is None assert get_previous_release('aaa') is None assert get_previous_release('xxx') is None