mirror of
https://github.com/pkkid/python-plexapi
synced 2025-02-16 12:58:26 +00:00
add test for checking _allowMediaDeletion method.
This commit is contained in:
parent
ba75935e0b
commit
8f96c34eac
1 changed files with 12 additions and 0 deletions
|
@ -269,3 +269,15 @@ def test_server_downloadLogs(tmpdir, plex):
|
|||
def test_server_downloadDatabases(tmpdir, plex):
|
||||
plex.downloadDatabases(savepath=str(tmpdir), unpack=True)
|
||||
assert len(tmpdir.listdir()) > 1
|
||||
|
||||
def test_server_allowMediaDeletion(account):
|
||||
plex = PlexServer(utils.SERVER_BASEURL, account.authenticationToken)
|
||||
plex._allowMediaDeletion(True)
|
||||
time.sleep(1)
|
||||
plex = PlexServer(utils.SERVER_BASEURL, account.authenticationToken)
|
||||
assert plex.allowMediaDeletion == True
|
||||
plex = PlexServer(utils.SERVER_BASEURL, account.authenticationToken)
|
||||
plex._allowMediaDeletion(False)
|
||||
time.sleep(1)
|
||||
plex = PlexServer(utils.SERVER_BASEURL, account.authenticationToken)
|
||||
assert plex.allowMediaDeletion == None
|
Loading…
Add table
Reference in a new issue