mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-26 21:50:20 +00:00
New test for originalTitle
This commit is contained in:
parent
63892f092f
commit
3932c25473
1 changed files with 10 additions and 1 deletions
|
@ -11,6 +11,7 @@ import argparse, sys, time
|
||||||
from os.path import dirname, abspath
|
from os.path import dirname, abspath
|
||||||
sys.path.append(dirname(dirname(abspath(__file__))))
|
sys.path.append(dirname(dirname(abspath(__file__))))
|
||||||
from utils import log, run_tests
|
from utils import log, run_tests
|
||||||
|
from plexapi.utils import NA
|
||||||
|
|
||||||
SHOW_SECTION = 'TV Shows'
|
SHOW_SECTION = 'TV Shows'
|
||||||
SHOW_TITLE = 'Game of Thrones'
|
SHOW_TITLE = 'Game of Thrones'
|
||||||
|
@ -79,7 +80,7 @@ def test_004_search_movie(plex, user=None):
|
||||||
|
|
||||||
|
|
||||||
def test_004b_search_movie(plex, user=None):
|
def test_004b_search_movie(plex, user=None):
|
||||||
movie_title = 'Dude Where\'s'
|
movie_title = 'Bedside Detective'
|
||||||
result_server = plex.search(movie_title)
|
result_server = plex.search(movie_title)
|
||||||
result_library = plex.library.search(movie_title)
|
result_library = plex.library.search(movie_title)
|
||||||
result_movies = plex.library.section(MOVIE_SECTION).search(movie_title)
|
result_movies = plex.library.section(MOVIE_SECTION).search(movie_title)
|
||||||
|
@ -91,6 +92,14 @@ def test_004b_search_movie(plex, user=None):
|
||||||
assert result_server == result_library == result_movies, 'Movie searches not consistent.'
|
assert result_server == result_library == result_movies, 'Movie searches not consistent.'
|
||||||
|
|
||||||
|
|
||||||
|
def test_004c_original_title_of_foreign_movie(plex, user=None):
|
||||||
|
movie_title = 'Bedside Detective'
|
||||||
|
result = plex.search(movie_title)
|
||||||
|
log(2, 'Title: %s' % result[0].title)
|
||||||
|
log(2, 'Original Title: %s' % result[0].originalTitle)
|
||||||
|
assert(result[0].originalTitle != NA)
|
||||||
|
|
||||||
|
|
||||||
def test_005_navigate_to_show(plex, user=None):
|
def test_005_navigate_to_show(plex, user=None):
|
||||||
result_shows = plex.library.section(SHOW_SECTION).get(SHOW_TITLE)
|
result_shows = plex.library.section(SHOW_SECTION).get(SHOW_TITLE)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue