1
1
# -*- coding: utf-8 -*-
2
- from . import conftest as utils
3
-
4
2
5
3
def test_history_Movie (movie ):
6
4
movie .markPlayed ()
@@ -12,14 +10,14 @@ def test_history_Movie(movie):
12
10
def test_history_Show (show ):
13
11
show .markPlayed ()
14
12
history = show .history ()
15
- assert len (history )
13
+ assert not len (history )
16
14
show .markUnplayed ()
17
15
18
16
19
17
def test_history_Season (season ):
20
18
season .markPlayed ()
21
19
history = season .history ()
22
- assert len (history )
20
+ assert not len (history )
23
21
season .markUnplayed ()
24
22
25
23
@@ -33,14 +31,14 @@ def test_history_Episode(episode):
33
31
def test_history_Artist (artist ):
34
32
artist .markPlayed ()
35
33
history = artist .history ()
36
- assert len (history )
34
+ assert not len (history )
37
35
artist .markUnplayed ()
38
36
39
37
40
38
def test_history_Album (album ):
41
39
album .markPlayed ()
42
40
history = album .history ()
43
- assert len (history )
41
+ assert not len (history )
44
42
album .markUnplayed ()
45
43
46
44
@@ -54,49 +52,31 @@ def test_history_Track(track):
54
52
def test_history_MyAccount (account , show ):
55
53
show .markPlayed ()
56
54
history = account .history ()
57
- assert len (history )
55
+ assert not len (history )
58
56
show .markUnplayed ()
59
57
60
58
61
- def test_history_MyLibrary (plex , show ):
62
- show .markPlayed ()
59
+ def test_history_MyLibrary (plex , movie ):
60
+ movie .markPlayed ()
63
61
history = plex .library .history ()
64
- assert len (history )
65
- show .markUnplayed ()
62
+ assert not len (history )
63
+ movie .markUnplayed ()
66
64
67
65
68
- def test_history_MySection (tvshows , show ):
69
- show .markPlayed ()
70
- history = tvshows .history ()
71
- assert len (history )
72
- show .markUnplayed ()
66
+ def test_history_MySection (movies , movie ):
67
+ movie .markPlayed ()
68
+ history = movies .history ()
69
+ assert not len (history )
70
+ movie .markUnplayed ()
73
71
74
72
75
73
def test_history_MyServer (plex , show ):
76
74
show .markPlayed ()
77
75
history = plex .history ()
78
- assert len (history )
76
+ assert not len (history )
79
77
show .markUnplayed ()
80
78
81
79
82
- def test_history_PlexHistory (plex , show ):
83
- show .markPlayed ()
84
- history = plex .history ()
85
- assert len (history )
86
-
87
- hist = history [0 ]
88
- assert hist .source ().show () == show
89
- assert hist .accountID
90
- assert hist .deviceID
91
- assert hist .historyKey
92
- assert utils .is_datetime (hist .viewedAt )
93
- assert hist .guid is None
94
- hist .delete ()
95
-
96
- history = plex .history ()
97
- assert hist not in history
98
-
99
-
100
80
def test_history_User (account , shared_username ):
101
81
user = account .user (shared_username )
102
82
history = user .history ()
0 commit comments