From 229c028a5e94fd0af5e020393676a6a0a4bc6d45 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Mon, 20 Dec 2021 11:08:18 -0800 Subject: [PATCH] Add test to lock/unlock all posters in a library --- tests/test_library.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_library.py b/tests/test_library.py index bc79e9aec..a81359fc2 100644 --- a/tests/test_library.py +++ b/tests/test_library.py @@ -383,6 +383,19 @@ def test_library_editAdvanced_default(movies): assert str(setting.value) == str(setting.default) +def test_library_lockUnlockAllFields(movies): + for movie in movies.all(): + assert 'thumb' not in [f.name for f in movie.fields] + + movies.lockAllField('thumb') + for movie in movies.all(): + assert 'thumb' in [f.name for f in movie.fields] + + movies.unlockAllField('thumb') + for movie in movies.all(): + assert 'thumb' not in [f.name for f in movie.fields] + + def test_search_with_weird_a(plex, tvshows): ep_title = "Coup de GrĂ¢ce" result_root = plex.search(ep_title)