2017-02-02 04:47:22 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2017-01-09 04:40:39 +00:00
|
|
|
|
2017-04-15 00:47:59 +00:00
|
|
|
def test_mark_movie_watched(movie):
|
|
|
|
movie.markUnwatched()
|
|
|
|
print('Marking movie watched: %s' % movie)
|
|
|
|
print('View count: %s' % movie.viewCount)
|
|
|
|
movie.markWatched()
|
|
|
|
print('View count: %s' % movie.viewCount)
|
|
|
|
assert movie.viewCount == 1, 'View count 0 after watched.'
|
|
|
|
movie.markUnwatched()
|
|
|
|
print('View count: %s' % movie.viewCount)
|
|
|
|
assert movie.viewCount == 0, 'View count 1 after unwatched.'
|
2017-01-09 04:40:39 +00:00
|
|
|
|
|
|
|
|
2017-04-15 00:47:59 +00:00
|
|
|
def test_refresh_section(tvshows):
|
|
|
|
tvshows.refresh()
|
2017-01-09 04:40:39 +00:00
|
|
|
|
2017-04-15 00:47:59 +00:00
|
|
|
|
|
|
|
def test_refresh_video(movie):
|
|
|
|
movie.refresh()
|
2019-08-06 19:53:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_rate_movie(movie):
|
|
|
|
oldrate = movie.userRating
|
2019-09-21 21:17:35 +00:00
|
|
|
if oldrate is None:
|
|
|
|
oldrate = 1
|
2019-08-06 19:53:31 +00:00
|
|
|
movie.rate(10.0)
|
|
|
|
assert movie.userRating == 10.0, 'User rating 10.0 after rating five stars.'
|
|
|
|
movie.rate(oldrate)
|