Skip to content

Commit f46d498

Browse files
author
Touchstone64
committed
Improve Season unit tests to provide partial objects have guids
1 parent 32d7cac commit f46d498

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

tests/test_video.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,11 +1196,15 @@ def test_video_Season_attrs(show):
11961196

11971197

11981198
def test_video_Season_show(show):
1199-
season = show.seasons()[0]
1200-
season_by_name = show.season("Season 1")
1201-
assert show.ratingKey == season.parentRatingKey and season_by_name.parentRatingKey
1202-
assert season.ratingKey == season_by_name.ratingKey
1203-
assert season.guids
1199+
plexapi.base.USER_DONT_RELOAD_FOR_KEYS.add('guids')
1200+
try:
1201+
season = show.seasons()[0]
1202+
season_by_name = show.season("Season 1")
1203+
assert show.ratingKey == season.parentRatingKey and season_by_name.parentRatingKey
1204+
assert season.ratingKey == season_by_name.ratingKey
1205+
assert season.guids
1206+
finally:
1207+
plexapi.base.USER_DONT_RELOAD_FOR_KEYS.remove('guids')
12041208

12051209

12061210
def test_video_Season_watched(show):

0 commit comments

Comments
 (0)