Skip to content

Commit 2f752d2

Browse files
committed
removeLocations with a Path object
addLocations with a Path object
1 parent d2c3fb1 commit 2f752d2

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/test_library.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def test_library_add_edit_delete(plex, movies, photos):
125125
# Create Other Videos library = No external metadata scanning
126126
section_name = "plexapi_test_section"
127127
movie_location = movies.locations[0]
128+
movie_path = plex.browse(path=movie_location)
128129
photo_location = photos.locations[0]
129130
plex.library.add(
130131
name=section_name,
@@ -172,6 +173,12 @@ def test_library_add_edit_delete(plex, movies, photos):
172173
section.addLocations(photo_location)
173174
section.reload()
174175
assert len(section.locations) == 2
176+
section.removeLocations(movie_path)
177+
section.reload()
178+
assert len(section.locations) == 1
179+
section.addLocations(movie_path)
180+
section.reload()
181+
assert len(section.locations) == 2
175182
# Attempt to remove all locations
176183
with pytest.raises(BadRequest):
177184
plex.library.removeLocations(section.locations)

0 commit comments

Comments
 (0)