Skip to content

Commit bdec69e

Browse files
committed
Update show/season watched/unwatched tests
1 parent 1049580 commit bdec69e

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

tests/test_video.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,17 +611,21 @@ def test_video_Show_history(show):
611611

612612
def test_video_Show_watched(tvshows):
613613
show = tvshows.get("The 100")
614-
show.episodes()[0].markWatched()
614+
episode = show.episodes()[0]
615+
episode.markWatched()
615616
watched = show.watched()
616617
assert len(watched) == 1 and watched[0].title == "Pilot"
618+
episode.markUnwatched()
617619

618620

619621
def test_video_Show_unwatched(tvshows):
620622
show = tvshows.get("The 100")
621623
episodes = show.episodes()
622-
episodes[0].markWatched()
624+
episode = episodes[0]
625+
episode.markWatched()
623626
unwatched = show.unwatched()
624627
assert len(unwatched) == len(episodes) - 1
628+
episode.markUnwatched()
625629

626630

627631
def test_video_Show_settings(show):
@@ -885,6 +889,25 @@ def test_video_Season_history(show):
885889
season.markUnwatched()
886890

887891

892+
def test_video_Season_watched(tvshows):
893+
season = tvshows.get("The 100").season(1)
894+
episode = season.episode(1)
895+
episode.markWatched()
896+
watched = season.watched()
897+
assert len(watched) == 1 and watched[0].title == "Pilot"
898+
episode.markUnwatched()
899+
900+
901+
def test_video_Season_unwatched(tvshows):
902+
season = tvshows.get("The 100").season(1)
903+
episodes = season.episodes()
904+
episode = episodes[0]
905+
episode.markWatched()
906+
unwatched = season.unwatched()
907+
assert len(unwatched) == len(episodes) - 1
908+
episode.markUnwatched()
909+
910+
888911
def test_video_Season_attrs(show):
889912
season = show.season("Season 1")
890913
assert utils.is_datetime(season.addedAt)

0 commit comments

Comments
 (0)