2019-11-16 21:35:20 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
|
|
|
def test_history_Movie(movie):
|
2022-08-26 19:14:24 +00:00
|
|
|
movie.markPlayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
history = movie.history()
|
|
|
|
assert len(history)
|
2022-08-26 19:14:24 +00:00
|
|
|
movie.markUnplayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_history_Show(show):
|
2022-08-26 19:14:24 +00:00
|
|
|
show.markPlayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
history = show.history()
|
|
|
|
assert len(history)
|
2022-08-26 19:14:24 +00:00
|
|
|
show.markUnplayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_history_Season(show):
|
2020-04-15 22:30:00 +00:00
|
|
|
season = show.season("Season 1")
|
2022-08-26 19:14:24 +00:00
|
|
|
season.markPlayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
history = season.history()
|
|
|
|
assert len(history)
|
2022-08-26 19:14:24 +00:00
|
|
|
season.markUnplayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_history_Episode(episode):
|
2022-08-26 19:14:24 +00:00
|
|
|
episode.markPlayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
history = episode.history()
|
|
|
|
assert len(history)
|
2022-08-26 19:14:24 +00:00
|
|
|
episode.markUnplayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_history_Artist(artist):
|
2022-08-26 19:14:24 +00:00
|
|
|
artist.markPlayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
history = artist.history()
|
2022-08-26 19:14:24 +00:00
|
|
|
assert len(history)
|
|
|
|
artist.markUnplayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_history_Album(album):
|
2022-08-26 19:14:24 +00:00
|
|
|
album.markPlayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
history = album.history()
|
2022-08-26 19:14:24 +00:00
|
|
|
assert len(history)
|
|
|
|
album.markUnplayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_history_Track(track):
|
2022-08-26 19:14:24 +00:00
|
|
|
track.markPlayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
history = track.history()
|
2022-08-26 19:14:24 +00:00
|
|
|
assert len(history)
|
|
|
|
track.markUnplayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_history_MyAccount(account, movie, show):
|
2022-08-26 19:14:24 +00:00
|
|
|
movie.markPlayed()
|
|
|
|
show.markPlayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
history = account.history()
|
|
|
|
assert len(history)
|
2022-08-26 19:14:24 +00:00
|
|
|
movie.markUnplayed()
|
|
|
|
show.markUnplayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_history_MyLibrary(plex, movie, show):
|
2022-08-26 19:14:24 +00:00
|
|
|
movie.markPlayed()
|
|
|
|
show.markPlayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
history = plex.library.history()
|
|
|
|
assert len(history)
|
2022-08-26 19:14:24 +00:00
|
|
|
movie.markUnplayed()
|
|
|
|
show.markUnplayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_history_MySection(plex, movie):
|
2022-08-26 19:14:24 +00:00
|
|
|
movie.markPlayed()
|
2020-04-15 22:30:00 +00:00
|
|
|
history = plex.library.section("Movies").history()
|
2019-11-16 21:35:20 +00:00
|
|
|
assert len(history)
|
2022-08-26 19:14:24 +00:00
|
|
|
movie.markUnplayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_history_MyServer(plex, movie):
|
2022-08-26 19:14:24 +00:00
|
|
|
movie.markPlayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
history = plex.history()
|
|
|
|
assert len(history)
|
2022-08-26 19:14:24 +00:00
|
|
|
movie.markUnplayed()
|
2019-11-16 21:35:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
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):
|
2020-04-15 22:30:00 +00:00
|
|
|
userSharedServerSection = (
|
|
|
|
account.user(shared_username).server(plex.friendlyName).section("Movies")
|
|
|
|
)
|
2019-11-16 21:35:20 +00:00
|
|
|
history = userSharedServerSection.history()
|