Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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')
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)