Avoid using deprecated methods in tests
MODIFY
tests/test_new_agent.py
tests/test_new_agent.py
@@ -17,7 +17,7 @@ def test_tv_lookup():
type='show',
))
- guid = m.guid
+ guid = m.guids[0]
assert guid.provider == 'imdb'
assert guid.id == 'tt2661044'
@@ -33,7 +33,7 @@ def test_tv_lookup_none():
type='show',
))
- guid = m.guid
+ guid = m.guids[0]
assert guid.provider == 'none'
assert guid.id == '68178'

MODIFY
tests/test_plex_search.py
tests/test_plex_search.py
@@ -11,7 +11,7 @@ def test_plex_search():
assert len(results) == 1
m = results[0]
- guid = m.guid
+ guid = m.guids[0]
assert m.type == "show"
assert m.item.title == "The Addams Family (1964)"

MODIFY
tests/test_tv_lookup.py
tests/test_tv_lookup.py
def test_tv_lookup():
m = PlexLibraryItem(make(cls='plexapi.video.Show', guid='imdb://tt10584350', type='show'))
- tm = trakt.find_by_media(m)
+ guid = m.guids[0]
+ tm = trakt.find_by_guid(guid)
lookup = trakt.lookup(tm)
te = lookup[1][2].instance
@@ -23,7 +24,8 @@ def test_tv_lookup_by_episode_id():
index=1,
))
- te = trakt.find_by_media(pe)
+ guid = pe.guids[0]
+ te = trakt.find_by_guid(guid)
assert te.imdb == "tt0505457"
assert te.tmdb == 511997
@@ -43,7 +45,8 @@ def test_find_episode():
index=1,
))
- te = trakt.find_episode(tm, pe)
+ guid = pe.guids[0]
+ te = trakt.find_episode_guid(tm, guid)
assert te.season == 1
assert te.episode == 1
assert te.imdb == "tt11909222"

Avoid using deprecated methods in tests