mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-15 00:17:33 +00:00
30 lines
794 B
Python
30 lines
794 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
|
|
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.'
|
|
|
|
|
|
def test_refresh_section(tvshows):
|
|
tvshows.refresh()
|
|
|
|
|
|
def test_refresh_video(movie):
|
|
movie.refresh()
|
|
|
|
|
|
def test_rate_movie(movie):
|
|
oldrate = movie.userRating
|
|
if oldrate is None:
|
|
oldrate = 1
|
|
movie.rate(10.0)
|
|
assert movie.userRating == 10.0, 'User rating 10.0 after rating five stars.'
|
|
movie.rate(oldrate)
|