コード例 #1
0
def test_search_series_and_season_and_episode(meta: dict, provider: TvMaze):
    query = MetadataEpisode(series=meta["series"],
                            season=meta["season"],
                            episode=meta["episode"])
    results = list(provider.search(query))
    assert results
    assert any(result.title == meta["title"] for result in results)
コード例 #2
0
def test_search_id_tvmaze_and_episode(meta: dict, provider: TvMaze):
    query = MetadataEpisode(id_tvmaze=meta["id_tvmaze"],
                            episode=meta["episode"])
    results = list(provider.search(query))
    assert results
    assert any(result.title == meta["title"] for result in results)
    assert all(result.episode == meta["episode"] for result in results)
コード例 #3
0
def test_search_id_tvmaze_and_season_and_episode(meta: dict, provider: TvMaze):
    query = MetadataEpisode(id_tvmaze=meta["id_tvmaze"],
                            season=meta["season"],
                            episode=meta["episode"])
    results = list(provider.search(query))
    assert results
    for result in results:
        assert result.title == meta["title"]
コード例 #4
0
def test_search_id_tvmaze__no_hits(provider: TvMaze):
    query = MetadataEpisode(id_tvmaze=JUNK_TEXT)
    with pytest.raises(MnamerNotFoundException):
        next(provider.search(query))
コード例 #5
0
def test_search_id_tvdb_and_date__no_hits(provider: TvMaze):
    query = MetadataEpisode(id_tvdb=JUNK_TEXT, date=TEST_DATE)
    with pytest.raises(MnamerNotFoundException):
        next(provider.search(query))
コード例 #6
0
def test_search_id_tvdb_and_date(meta, provider: TvMaze):
    query = MetadataEpisode(id_tvdb=meta["id_tvdb"], date=meta["date"])
    results = list(provider.search(query))
    assert results
    for result in results:
        assert result.title == meta["title"]
コード例 #7
0
def test_search_series_and_episode__no_hits(provider: TvMaze):
    query = MetadataEpisode(series=JUNK_TEXT, episode=1)
    with pytest.raises(MnamerNotFoundException):
        next(provider.search(query))
コード例 #8
0
def test_search_id_tvdb(meta: dict, provider: TvMaze):
    query = MetadataEpisode(id_tvdb=meta["id_tvdb"])
    results = list(provider.search(query))
    assert results
    assert any(result.title == meta["title"] for result in results)