From 15f76e8480bbf57578278ec374f9296f4e95d1f1 Mon Sep 17 00:00:00 2001 From: blacktwin Date: Fri, 12 Jun 2020 14:17:08 -0400 Subject: [PATCH] add test for confirming edit and field locked on a collection --- tests/test_library.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_library.py b/tests/test_library.py index 17f8f54a..0fc29837 100644 --- a/tests/test_library.py +++ b/tests/test_library.py @@ -238,6 +238,18 @@ def test_library_Colletion_sortRelease(collection): assert collection.collectionSort == "0" +def test_library_Colletion_edit(collection): + edits = {'titleSort.value': 'New Title Sort', 'titleSort.locked': 1} + collectionTitleSort = collection.titleSort + collection.edit(**edits) + collection.reload() + for field in collection.fields: + if field.name == 'titleSort': + assert collection.titleSort == 'New Title Sort' + assert field.locked == True + collection.edit(**{'titleSort.value': collectionTitleSort, 'titleSort.locked': 0}) + + def test_search_with_weird_a(plex): ep_title = "Coup de GrĂ¢ce" result_root = plex.search(ep_title)