mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-23 12:13:18 +00:00
12cf146ace
* Remove unnecessary use of comprehension * Remove unnecessary comprehension * Use literal syntax instead of function calls to create data structure * Pass string format arguments as logging method parameters * Remove unused imports * Remove unnecessary generator * Refactor `if` expression * fixed typo Co-authored-by: jjlawren <jjlawren@users.noreply.github.com> * Update tests/test_audio.py Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
91 lines
2 KiB
Python
91 lines
2 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
|
|
def test_history_Movie(movie):
|
|
movie.markWatched()
|
|
history = movie.history()
|
|
assert len(history)
|
|
movie.markUnwatched()
|
|
|
|
|
|
def test_history_Show(show):
|
|
show.markWatched()
|
|
history = show.history()
|
|
assert len(history)
|
|
show.markUnwatched()
|
|
|
|
|
|
def test_history_Season(show):
|
|
season = show.season("Season 1")
|
|
season.markWatched()
|
|
history = season.history()
|
|
assert len(history)
|
|
season.markUnwatched()
|
|
|
|
|
|
def test_history_Episode(episode):
|
|
episode.markWatched()
|
|
history = episode.history()
|
|
assert len(history)
|
|
episode.markUnwatched()
|
|
|
|
|
|
def test_history_Artist(artist):
|
|
history = artist.history()
|
|
|
|
|
|
def test_history_Album(album):
|
|
history = album.history()
|
|
|
|
|
|
def test_history_Track(track):
|
|
history = track.history()
|
|
|
|
|
|
def test_history_MyAccount(account, movie, show):
|
|
movie.markWatched()
|
|
show.markWatched()
|
|
history = account.history()
|
|
assert len(history)
|
|
movie.markUnwatched()
|
|
show.markUnwatched()
|
|
|
|
|
|
def test_history_MyLibrary(plex, movie, show):
|
|
movie.markWatched()
|
|
show.markWatched()
|
|
history = plex.library.history()
|
|
assert len(history)
|
|
movie.markUnwatched()
|
|
show.markUnwatched()
|
|
|
|
|
|
def test_history_MySection(plex, movie):
|
|
movie.markWatched()
|
|
history = plex.library.section("Movies").history()
|
|
assert len(history)
|
|
movie.markUnwatched()
|
|
|
|
|
|
def test_history_MyServer(plex, movie):
|
|
movie.markWatched()
|
|
history = plex.history()
|
|
assert len(history)
|
|
movie.markUnwatched()
|
|
|
|
|
|
def test_history_User(account, shared_username):
|
|
user = account.user(shared_username)
|
|
history = user.history()
|
|
|
|
|
|
def test_history_UserServer(account, shared_username, plex):
|
|
userSharedServer = account.user(shared_username).server(plex.friendlyName)
|
|
history = userSharedServer.history()
|
|
|
|
|
|
def test_history_UserSection(account, shared_username, plex):
|
|
userSharedServerSection = (
|
|
account.user(shared_username).server(plex.friendlyName).section("Movies")
|
|
)
|
|
history = userSharedServerSection.history()
|