Exemple #1
0
    def search(cls, name, year=None):
        """Perform a search for an episode with a title matching *title*

        :param name: The name of the person to search for
        :param year: Optional year to limit results to
        """
        return search(name, search_type='person', year=year)
Exemple #2
0
    def search(cls, title, year=None):
        """Perform a search for an episode with a title matching *title*

        :param title: The title to search for
        :param year: Optional year to limit results to
        """
        return search(title, search_type='episode', year=year)
Exemple #3
0
    def search(cls, title, year=None):
        """Perform a search for the specified *title*.

        :param title: The title to search for
        :param year: An optional year for the item you're searching for.
        """
        return search(title, search_type='show', year=year)
Exemple #4
0
    def search(cls, title, year=None):
        """Perform a search for an episode with a title matching *title*

        :param title: The title to search for
        :param year: Optional year to limit results to
        """
        return search(title, search_type='episode', year=year)
Exemple #5
0
    def search(cls, name, year=None):
        """Perform a search for an episode with a title matching *title*

        :param name: The name of the person to search for
        :param year: Optional year to limit results to
        """
        return search(name, search_type='person', year=year)
Exemple #6
0
def search_all(query: str, search_type=['movie', 'show', 'people']):
    results = search(query=query, search_type=search_type, slugify_query=True)
    return results
Exemple #7
0
    def search(cls, title, year=None):
        """Perform a search for the specified *title*

        :param title: The title to search for
        """
        return search(title, search_type='show', year=year)
Exemple #8
0
def test_search_person():
    """test that person search results are successfully returned"""
    cranston_results = search('cranston', search_type='person')
    assert isinstance(cranston_results, list)
    assert all(isinstance(p, Person) for p in cranston_results)
Exemple #9
0
def test_search_episode():
    """test that tv episode search results are successfully returned"""
    batman_results = search('batman', search_type='episode')
    assert isinstance(batman_results, list)
    assert all(isinstance(m, TVEpisode) for m in batman_results)
Exemple #10
0
def test_search_show():
    """test that tv show search results are successfully returned"""
    batman_results = search('batman', search_type='show')
    assert isinstance(batman_results, list)
    assert all(isinstance(m, TVShow) for m in batman_results)
Exemple #11
0
def test_search_movie_with_year():
    batman_results = search('batman', year='1966')
    assert isinstance(batman_results, list)
    assert len(batman_results) == 2
    assert all(isinstance(m, Movie) for m in batman_results)
Exemple #12
0
def test_search_movie():
    """test that movie search results are successfully returned"""
    batman_results = search('batman')
    assert isinstance(batman_results, list)
    assert len(batman_results) == 2
    assert all(isinstance(m, Movie) for m in batman_results)
Exemple #13
0
    def search(cls, title):
        """Perform a search for the specified *title*

        :param title: The title to search for
        """
        return search(title, search_type='show')
Exemple #14
0
def test_search_movie():
    """test that movie search results are successfully returned"""
    batman_results = search('batman')
    assert isinstance(batman_results, list)
    assert len(batman_results) == 2
    assert all(isinstance(m, Movie) for m in batman_results)
Exemple #15
0
def test_search_person():
    """test that person search results are successfully returned"""
    cranston_results = search('cranston', search_type='person')
    assert isinstance(cranston_results, list)
    assert all(isinstance(p, Person) for p in cranston_results)
Exemple #16
0
def test_search_episode():
    """test that tv episode search results are successfully returned"""
    batman_results = search('batman', search_type='episode')
    assert isinstance(batman_results, list)
    assert all(isinstance(m, TVEpisode) for m in batman_results)
Exemple #17
0
def test_search_show():
    """test that tv show search results are successfully returned"""
    batman_results = search('batman', search_type='show')
    assert isinstance(batman_results, list)
    assert all(isinstance(m, TVShow) for m in batman_results)
Exemple #18
0
def test_search_movie_with_year():
    batman_results = search('batman', year='1966')
    assert isinstance(batman_results, list)
    assert len(batman_results) == 1
    assert all(isinstance(m, Movie) for m in batman_results)