'thetvdb: Test Lookup (ONLINE)'

def test_lookup(self, mocked_expired, execute_task):

    persist[u'auth_tokens'] = {u'default': None}
    task = execute_task(u'test')
    assert task.find_entry(tvdb_ep_name=u'School    Reunion'), u'Failed    imdb    lookup    Doctor    Who    2005    S02E03'
    entry = task.find_entry(title=u'House.S01E02.HDTV.XViD-FlexGet')
    assert (entry[u'tvdb_id'] == 73255)
    assert (entry[u'tvdb_absolute_number'] == 3)
    assert (entry[u'tvdb_rating'] == 9.1)
    assert (entry[u'tvdb_runtime'] == 45)
    assert (entry[u'tvdb_season'] == 1)
    assert (entry[u'tvdb_series_name'] == u'House')
    assert (entry[u'tvdb_status'] == u'Ended')
    assert (entry[u'tvdb_air_time'] == u'')
    assert (entry[u'tvdb_airs_day_of_week'] == u'')
    assert re.match(u'http://thetvdb.com/banners/graphical/73255-g[0-9]+.jpg', entry[u'tvdb_banner'])
    assert (u'http://thetvdb.com/banners/posters/73255-1.jpg' in entry[u'tvdb_posters'])
    assert (entry[u'tvdb_content_rating'] == u'TV-14')
    assert (entry[u'tvdb_episode'] == 2)
    assert (entry[u'tvdb_first_air_date'] == datetime(2004, 11, 16, 0, 0))
    assert (entry[u'tvdb_network'] == u'FOX    (US)')
    assert (entry[u'tvdb_genres'] == [u'Drama', u'Mystery'])
    assert (u'Jesse    Spencer' in entry[u'tvdb_actors'])
    assert (entry[u'tvdb_overview'] == u"Go    deeper    into    the    medical    mysteries    of    House,    TV's    most    compelling    drama.    Hugh    Laurie    stars    as    the    brilliant    but    sarcastic    Dr.    Gregory    House,    a    maverick    physician    who    is    devoid    of    bedside    manner.    While    his    behavior    can    border    on    antisocial,    Dr.    House    thrives    on    the    challenge    of    solving    the    medical    puzzles    that    other    doctors    give    up    on.    Together    with    his    hand-picked    team    of    young    medical    experts,    he'll    do    whatever    it    takes    in    the    race    against    the    clock    to    solve    the    case.")
    assert (entry[u'tvdb_ep_air_date'] == datetime(2004, 11, 23, 0, 0))
    assert (entry[u'tvdb_ep_directors'] == u"Peter    O'Fallon")
    assert (entry[u'tvdb_ep_id'] == u'S01E02')
    assert (entry[u'tvdb_ep_image'] == u'http://thetvdb.com/banners/episodes/73255/110995.jpg')
    assert (entry[u'tvdb_ep_name'] == u'Paternity')
    assert (entry[u'tvdb_ep_overview'] == u"When    a    teenage    lacrosse    player    is    stricken    with    an    unidentifiable    brain    disease,    Dr.    House    and    the    team    hustle    to    give    his    parents    answers.    Chase    breaks    the    bad    news,    the    kid    has    MS,    but    the    boy's    night-terror    hallucinations    disprove    the    diagnosis    and    send    House    and    his    team    back    to    square    one.    As    the    boy's    health    deteriorates.    House's    side-bet    on    the    paternity    of    the    patient    infuriates    Dr.    Cuddy    and    the    teenager's    parents,    but    may    just    pay    off    in    spades.")
    assert (entry[u'tvdb_ep_rating'] == 7.8)
    assert (entry[u'tvdb_language'] == u'en')
