python-plexapi/tests/test_settings.py
blacktwin 01239046c7 cleaning up test_settings.test_settings_get test
py2 support has been dropped. returning str instead of bytes now due to 5045ddc
2020-09-28 13:58:31 -04:00

26 lines
687 B
Python

def test_settings_group(plex):
assert plex.settings.group("general")
def test_settings_get(plex):
value = plex.settings.get("FriendlyName").value
assert isinstance(value, str)
def test_settings_set(plex):
cd = plex.settings.get("autoEmptyTrash")
old_value = cd.value
new_value = not old_value
cd.set(new_value)
plex.settings.save()
plex._settings = None
assert plex.settings.get("autoEmptyTrash").value == new_value
def test_settings_set_str(plex):
cd = plex.settings.get("OnDeckWindow")
new_value = 99
cd.set(new_value)
plex.settings.save()
plex._settings = None
assert plex.settings.get("OnDeckWindow").value == 99