def test_repo_can_add_genre(session_factory):
    repo = SqlAlchemyRepository(session_factory)

    genre = Genre('Anime')
    repo.add_genre(genre)

    assert genre in repo.get_genres()
def test_repo_can_retrieve_genres(session_factory):
    repo = SqlAlchemyRepository(session_factory)

    genres = repo.get_genres()

    assert len(genres) == 20