Ejemplo n.º 1
0
def test_tvdb_episodes_id__success(tvdb_token):
    expected_top_level_keys = {
        "absoluteNumber",
        "airedEpisodeNumber",
        "airedSeason",
        "airedSeasonID",
        "airsAfterSeason",
        "airsBeforeEpisode",
        "airsBeforeSeason",
        "director",
        "directors",
        "dvdChapter",
        "dvdDiscid",
        "dvdEpisodeNumber",
        "dvdSeason",
        "episodeName",
        "filename",
        "firstAired",
        "guestStars",
        "id",
        "imdbId",
        "language",
        "lastUpdated",
        "lastUpdatedBy",
        "overview",
        "productionCode",
        "seriesId",
        "showUrl",
        "siteRating",
        "siteRatingCount",
        "thumbAdded",
        "thumbAuthor",
        "thumbHeight",
        "thumbWidth",
        "writers",
    }
    result = tvdb_episodes_id(tvdb_token, LOST_TVDB_ID_EPISODE)
    assert isinstance(result, dict)
    assert "data" in result
    assert set(result["data"].keys()) == expected_top_level_keys
    assert result["data"]["seriesId"] == LOST_TVDB_ID_SERIES
    assert result["data"]["id"] == LOST_TVDB_ID_EPISODE
Ejemplo n.º 2
0
def test_tvdb_episodes_id__no_hits(tvdb_token):
    with pytest.raises(MapiNotFoundException):
        tvdb_episodes_id(tvdb_token, LOST_TVDB_ID_EPISODE**2)
Ejemplo n.º 3
0
def test_tvdb_episodes_id__invalid_lang(tvdb_token):
    with pytest.raises(MapiProviderException):
        tvdb_episodes_id(tvdb_token, LOST_TVDB_ID_EPISODE, lang=JUNK_TEXT)
Ejemplo n.º 4
0
def test_tvdb_episodes_id__invalid_id_imdb(tvdb_token):
    with pytest.raises(MapiProviderException):
        tvdb_episodes_id(tvdb_token, JUNK_TEXT, cache=False)
Ejemplo n.º 5
0
def test_tvdb_episodes_id__invalid_token():
    with pytest.raises(MapiProviderException):
        tvdb_episodes_id(JUNK_TEXT, LOST_TVDB_ID_EPISODE, cache=False)