From b37e7fefeb4d9fabacd9f7116110e10058fc213b Mon Sep 17 00:00:00 2001 From: Hellowlol Date: Sat, 11 Feb 2017 00:32:51 +0100 Subject: [PATCH] Fix test_video.py::test_video_Show_section remove untrue comment --- plexapi/library.py | 2 +- tests/test_utils.py | 9 +++++---- tests/test_video.py | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/plexapi/library.py b/plexapi/library.py index b09ac2fe..bab288cd 100644 --- a/plexapi/library.py +++ b/plexapi/library.py @@ -186,7 +186,7 @@ class LibrarySection(PlexObject): self.uuid = data.attrib.get('uuid') def __repr__(self): - return '<%s>' % ':'.join([p for p in [self.__class__.__name__, self.key, self.librarySectionTitle] if p]) + return '<%s>' % ':'.join([p for p in [self.__class__.__name__, self.key, self.title] if p]) def delete(self): """Delete a library section.""" diff --git a/tests/test_utils.py b/tests/test_utils.py index 5c7ff21e..c656024b 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -89,13 +89,14 @@ def test_utils_cast(): def test_utils_download(a_episode): - # this files is really getting downloaded.. without_session = utils.download(a_episode.getStreamURL(), - filename=a_episode.location, mocked=True) + filename=a_episode.location, + mocked=True) assert without_session with_session = utils.download(a_episode.getStreamURL(), - filename=a_episode.location, session=a_episode._server._session, - mocked=True) + filename=a_episode.location, + session=a_episode._server._session, + mocked=True) assert with_session img = utils.download(a_episode.thumbUrl, filename=a_episode.title, mocked=True) assert img diff --git a/tests/test_video.py b/tests/test_video.py index bdfefaf0..64765e28 100644 --- a/tests/test_video.py +++ b/tests/test_video.py @@ -369,9 +369,9 @@ def test_video_Show_isWatched(a_show): assert not a_show.isWatched -@pytest.mark.xfail -def test_video_Show_section(a_show): # BROKEN! - show = a_show.section() +def test_video_Show_section(a_show): + section = a_show.section() + assert section.title == 'TV Shows' def test_video_Episode(a_show):