Reset collection mode and sort after test

This commit is contained in:
JonnyWong16 2021-02-14 23:48:58 -08:00
parent 094bfcef43
commit 18e2f15b57
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -43,9 +43,10 @@ def test_Collection_modeUpdate(collection):
assert collection.collectionMode == value
with pytest.raises(BadRequest):
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}
for key, value in sort_dict.items():
collection.sortUpdate(sort=key)
@ -53,9 +54,10 @@ def test_Colletion_sortUpdate(collection):
assert collection.collectionSort == value
with pytest.raises(BadRequest):
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}
collectionTitleSort = collection.titleSort
collection.edit(**edits)