mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 19:53:17 +00:00
Reset collection mode and sort after test
This commit is contained in:
parent
094bfcef43
commit
18e2f15b57
1 changed files with 4 additions and 2 deletions
|
@ -43,9 +43,10 @@ def test_Collection_modeUpdate(collection):
|
||||||
assert collection.collectionMode == value
|
assert collection.collectionMode == value
|
||||||
with pytest.raises(BadRequest):
|
with pytest.raises(BadRequest):
|
||||||
collection.modeUpdate(mode="bad-mode")
|
collection.modeUpdate(mode="bad-mode")
|
||||||
|
collection.modeUpdate("default")
|
||||||
|
|
||||||
|
|
||||||
def test_Colletion_sortUpdate(collection):
|
def test_Collection_sortUpdate(collection):
|
||||||
sort_dict = {"release": 0, "alpha": 1, "custom": 2}
|
sort_dict = {"release": 0, "alpha": 1, "custom": 2}
|
||||||
for key, value in sort_dict.items():
|
for key, value in sort_dict.items():
|
||||||
collection.sortUpdate(sort=key)
|
collection.sortUpdate(sort=key)
|
||||||
|
@ -53,9 +54,10 @@ def test_Colletion_sortUpdate(collection):
|
||||||
assert collection.collectionSort == value
|
assert collection.collectionSort == value
|
||||||
with pytest.raises(BadRequest):
|
with pytest.raises(BadRequest):
|
||||||
collection.sortUpdate(sort="bad-sort")
|
collection.sortUpdate(sort="bad-sort")
|
||||||
|
collection.sortUpdate("release")
|
||||||
|
|
||||||
|
|
||||||
def test_Colletion_edit(collection):
|
def test_Collection_edit(collection):
|
||||||
edits = {"titleSort.value": "New Title Sort", "titleSort.locked": 1}
|
edits = {"titleSort.value": "New Title Sort", "titleSort.locked": 1}
|
||||||
collectionTitleSort = collection.titleSort
|
collectionTitleSort = collection.titleSort
|
||||||
collection.edit(**edits)
|
collection.edit(**edits)
|
||||||
|
|
Loading…
Reference in a new issue