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
def test_tvdb_episodes_id__no_hits(tvdb_token): with pytest.raises(MapiNotFoundException): tvdb_episodes_id(tvdb_token, LOST_TVDB_ID_EPISODE**2)
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)
def test_tvdb_episodes_id__invalid_id_imdb(tvdb_token): with pytest.raises(MapiProviderException): tvdb_episodes_id(tvdb_token, JUNK_TEXT, cache=False)
def test_tvdb_episodes_id__invalid_token(): with pytest.raises(MapiProviderException): tvdb_episodes_id(JUNK_TEXT, LOST_TVDB_ID_EPISODE, cache=False)