mirror of
https://github.com/pkkid/python-plexapi
synced 2024-09-20 13:51:57 +00:00
More tests fixes
This commit is contained in:
parent
25fb8478fb
commit
72094fce40
3 changed files with 6 additions and 4 deletions
|
@ -179,8 +179,10 @@ class Movie(Video, Playable):
|
||||||
url = self.getStreamURL(**kwargs)
|
url = self.getStreamURL(**kwargs)
|
||||||
else:
|
else:
|
||||||
self._server.url('%s?download=1' % location.key)
|
self._server.url('%s?download=1' % location.key)
|
||||||
filepath = utils.download(url, filename=name, savepath=savepath, session=self._server._session, **kwargs)
|
filepath = utils.download(url, filename=name, savepath=savepath, session=self._server._session)
|
||||||
filepaths.append(filepath)
|
if filepath:
|
||||||
|
filepaths.append(filepath)
|
||||||
|
|
||||||
return filepaths
|
return filepaths
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ def test_server_account(plex):
|
||||||
assert account.signInState == 'ok'
|
assert account.signInState == 'ok'
|
||||||
assert isinstance(account.subscriptionActive, bool)
|
assert isinstance(account.subscriptionActive, bool)
|
||||||
if account.subscriptionActive: assert len(account.subscriptionFeatures)
|
if account.subscriptionActive: assert len(account.subscriptionFeatures)
|
||||||
else: assert account.subscriptionFeatures == []
|
else: assert account.subscriptionFeatures == ['mediaproviders-news-platform-specific']
|
||||||
assert account.subscriptionState == 'Active' if account.subscriptionActive else 'Unknown'
|
assert account.subscriptionState == 'Active' if account.subscriptionActive else 'Unknown'
|
||||||
assert re.match(utils.REGEX_EMAIL, account.username)
|
assert re.match(utils.REGEX_EMAIL, account.username)
|
||||||
|
|
||||||
|
|
|
@ -278,7 +278,7 @@ def test_video_Show_attrs(show):
|
||||||
assert show.originallyAvailableAt.strftime('%Y-%m-%d') == '2011-04-17'
|
assert show.originallyAvailableAt.strftime('%Y-%m-%d') == '2011-04-17'
|
||||||
assert show.rating >= 8.0
|
assert show.rating >= 8.0
|
||||||
assert utils.is_int(show.ratingKey)
|
assert utils.is_int(show.ratingKey)
|
||||||
assert sorted([i.tag for i in show.roles])[:4] == ['Aidan Gillen', 'Alexander Siddig', 'Alfie Allen', 'Anton Lesser']
|
assert sorted([i.tag for i in show.roles])[:4] == ['Aidan Gillen', 'Alexander Siddig', 'Alfie Allen', 'Art Parkinson']
|
||||||
assert sorted([i.tag for i in show.actors])[:4] == ['Aidan Gillen', 'Alexander Siddig', 'Alfie Allen', 'Anton Lesser']
|
assert sorted([i.tag for i in show.actors])[:4] == ['Aidan Gillen', 'Alexander Siddig', 'Alfie Allen', 'Anton Lesser']
|
||||||
assert show._server._baseurl == utils.SERVER_BASEURL
|
assert show._server._baseurl == utils.SERVER_BASEURL
|
||||||
assert show.studio == 'HBO'
|
assert show.studio == 'HBO'
|
||||||
|
|
Loading…
Reference in a new issue