File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,11 @@ def test_mark_movie_watched(movie):
66 print ('Marking movie watched: %s' % movie )
77 print ('View count: %s' % movie .viewCount )
88 movie .markWatched ()
9+ movie .reload ()
910 print ('View count: %s' % movie .viewCount )
1011 assert movie .viewCount == 1 , 'View count 0 after watched.'
1112 movie .markUnwatched ()
13+ movie .reload ()
1214 print ('View count: %s' % movie .viewCount )
1315 assert movie .viewCount == 0 , 'View count 1 after unwatched.'
1416
Original file line number Diff line number Diff line change @@ -185,8 +185,9 @@ def edit_rating(obj):
185185 assert utils .is_datetime (obj .lastRatedAt )
186186 assert obj .userRating == 10.0
187187 obj .rate ()
188- obj .reload ()
189- assert obj .lastRatedAt is None
188+ # Cannot use obj.reload() since PlexObject.__setattr__()
189+ # will not overwrite userRating with None
190+ obj = obj .fetchItem (obj ._details_key )
190191 assert obj .userRating is None
191192 with pytest .raises (BadRequest ):
192193 assert obj .rate ('bad-rating' )
Original file line number Diff line number Diff line change @@ -697,11 +697,13 @@ def test_video_Show_analyze(show):
697697
698698def test_video_Show_markWatched (show ):
699699 show .markWatched ()
700+ show .reload ()
700701 assert show .isWatched
701702
702703
703704def test_video_Show_markUnwatched (show ):
704705 show .markUnwatched ()
706+ show .reload ()
705707 assert not show .isWatched
706708
707709
@@ -814,12 +816,14 @@ def test_video_Season_show(show):
814816def test_video_Season_watched (show ):
815817 season = show .season ("Season 1" )
816818 season .markWatched ()
819+ season .reload ()
817820 assert season .isWatched
818821
819822
820823def test_video_Season_unwatched (show ):
821824 season = show .season ("Season 1" )
822825 season .markUnwatched ()
826+ season .reload ()
823827 assert not season .isWatched
824828
825829
You can’t perform that action at this time.
0 commit comments