2017-10-25 21:09:08 +00:00
|
|
|
def test_settings_group(plex):
|
2020-04-29 21:23:22 +00:00
|
|
|
assert plex.settings.group("general")
|
2017-10-25 21:09:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_settings_get(plex):
|
2020-04-29 21:23:22 +00:00
|
|
|
value = plex.settings.get("FriendlyName").value
|
2020-09-28 17:58:07 +00:00
|
|
|
assert isinstance(value, str)
|
2017-10-25 21:09:08 +00:00
|
|
|
|
|
|
|
|
2018-09-14 18:03:23 +00:00
|
|
|
def test_settings_set(plex):
|
2020-04-29 21:23:22 +00:00
|
|
|
cd = plex.settings.get("autoEmptyTrash")
|
2018-09-14 18:03:23 +00:00
|
|
|
old_value = cd.value
|
|
|
|
new_value = not old_value
|
|
|
|
cd.set(new_value)
|
2017-10-25 21:09:08 +00:00
|
|
|
plex.settings.save()
|
2022-12-21 19:51:45 +00:00
|
|
|
del plex.__dict__['settings']
|
2020-04-29 21:23:22 +00:00
|
|
|
assert plex.settings.get("autoEmptyTrash").value == new_value
|
2018-11-17 19:42:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_settings_set_str(plex):
|
2020-04-29 21:23:22 +00:00
|
|
|
cd = plex.settings.get("OnDeckWindow")
|
2018-11-17 19:42:03 +00:00
|
|
|
new_value = 99
|
|
|
|
cd.set(new_value)
|
|
|
|
plex.settings.save()
|
2022-12-21 19:51:45 +00:00
|
|
|
del plex.__dict__['settings']
|
2020-04-29 21:23:22 +00:00
|
|
|
assert plex.settings.get("OnDeckWindow").value == 99
|