forked from pushingkarmaorg/python-plexapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_history.py
More file actions
98 lines (69 loc) · 2.19 KB
/
test_history.py
File metadata and controls
98 lines (69 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
def test_history_Movie(movie):
movie.markPlayed()
history = movie.history()
assert not len(history)
movie.markUnplayed()
def test_history_Show(show):
show.markPlayed()
history = show.history()
assert not len(history)
show.markUnplayed()
def test_history_Season(season):
season.markPlayed()
history = season.history()
assert not len(history)
season.markUnplayed()
def test_history_Episode(episode):
episode.markPlayed()
history = episode.history()
assert not len(history)
episode.markUnplayed()
def test_history_Artist(artist):
artist.markPlayed()
history = artist.history()
assert not len(history)
artist.markUnplayed()
def test_history_Album(album):
album.markPlayed()
history = album.history()
assert not len(history)
album.markUnplayed()
def test_history_Track(track):
track.markPlayed()
history = track.history()
assert not len(history)
track.markUnplayed()
def test_history_MyAccount(account, show):
show.markPlayed()
history = account.history()
assert not len(history)
show.markUnplayed()
def test_history_MyLibrary(plex, movie):
movie.markPlayed()
history = plex.library.history()
assert not len(history)
movie.markUnplayed()
def test_history_MySection(movies, movie):
movie.markPlayed()
history = movies.history()
assert not len(history)
movie.markUnplayed()
def test_history_MyServer(plex, show):
show.markPlayed()
history = plex.history()
assert not len(history)
show.markUnplayed()
def test_history_User(account, shared_username):
user = account.user(shared_username)
history = user.history()
assert isinstance(history, list)
def test_history_UserServer(account, shared_username, plex):
userSharedServer = account.user(shared_username).server(plex.friendlyName)
history = userSharedServer.history()
assert isinstance(history, list)
def test_history_UserSection(account, shared_username, plex):
userSharedServerSection = (
account.user(shared_username).server(plex.friendlyName).section("Movies")
)
history = userSharedServerSection.history()
assert isinstance(history, list)