Skip to content

Commit 75a0c7b

Browse files
authored
tests for collection's mode and sort
1 parent 1587aa7 commit 75a0c7b

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

tests/test_library.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import pytest
33
from plexapi.exceptions import NotFound
44
from . import conftest as utils
5+
from time import sleep
56

67

78
def test_library_Library_section(plex):
@@ -201,6 +202,41 @@ def test_library_and_section_search_for_movie(plex):
201202
assert l_search == s_search
202203

203204

205+
def test_library_colletion_hide(collection):
206+
collection.modeUpdate(mode='hide')
207+
collection.reload()
208+
assert collection.collectionMode == '0'
209+
210+
211+
def test_library_colletion_default(collection):
212+
collection.modeUpdate(mode='default')
213+
collection.reload()
214+
assert collection.collectionMode == '-2'
215+
216+
217+
def test_library_colletion_hideItems(collection):
218+
collection.modeUpdate(mode='hideItems')
219+
collection.reload()
220+
assert collection.collectionMode == '1'
221+
222+
223+
def test_library_colletion_showItems(collection):
224+
collection.modeUpdate(mode='showItems')
225+
collection.reload()
226+
assert collection.collectionMode == '2'
227+
228+
229+
def test_library_colletion_sortAlpha(collection):
230+
collection.sortUpdate(mode='alpha')
231+
collection.reload()
232+
assert collection.collectionMode == '1'
233+
234+
235+
def test_library_colletion_sortRelease(collection):
236+
collection.sortUpdate(mode='release')
237+
collection.reload()
238+
assert collection.collectionMode == '0'
239+
204240
# This started failing on more recent Plex Server builds
205241
@pytest.mark.xfail
206242
def test_search_with_apostrophe(plex):

0 commit comments

Comments
 (0)