Skip to content

Commit 4d6cffd

Browse files
committed
Add test for LibrarySection.all() returning guids
1 parent bc6afeb commit 4d6cffd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_library.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from collections import namedtuple
33
from datetime import datetime, timedelta
44
import pytest
5+
import plexapi.base
56
from plexapi.exceptions import BadRequest, NotFound
67

78
from . import conftest as utils
@@ -58,6 +59,19 @@ def test_library_section_movies_all(movies):
5859
assert len(movies.all(container_start=0, container_size=1, maxresults=1)) == 1
5960

6061

62+
def test_library_section_movies_all_guids(movies):
63+
plexapi.base.USER_DONT_RELOAD_FOR_KEYS.add('guids')
64+
try:
65+
results = movies.all(includeGuids=False)
66+
assert results[0].guids == []
67+
results = movies.all()
68+
assert results[0].guids
69+
movie = movies.get("Sita Sings the Blues")
70+
assert movie.guids
71+
finally:
72+
plexapi.base.USER_DONT_RELOAD_FOR_KEYS.remove('guids')
73+
74+
6175
def test_library_section_totalViewSize(tvshows):
6276
assert tvshows.totalViewSize() == 2
6377
assert tvshows.totalViewSize(libtype="show") == 2

0 commit comments

Comments
 (0)