Exemplo n.º 1
0
def get_all_genres(repo: AbstractRepository):
    genres = []

    for genre in repo.get_genres():
        genres.append(genre)

    if genres is []:
        raise NonExistentGenreException

    return sorted(genres)
Exemplo n.º 2
0
def get_genre_names(repo:AbstractRepository) -> List[str]:
    genres = repo.get_genres()
    genre_names = [genre.genre_name for genre in genres]

    return genre_names