Example #1
0
def test_other():
    filename = 'movie_web_app/adapters/Data1000Movies.csv'
    file_reader = MovieFileCSVReader(filename)
    all_directors_sorted = sorted(file_reader.dataset_of_directors)
    assert all_directors_sorted[0:3] == [Director("Aamir Khan"), Director("Abdellatif Kechiche"), Director("Adam Leon")]
Example #2
0
def test_search_actor_normal():
    filename = 'movie_web_app/adapters/Data1000Movies.csv'
    file_reader = MovieFileCSVReader(filename)
    assert len(file_reader.get_actor_name("Robert Downey Jr.")) == 12
Example #3
0
def test_search_genre_normal():
    filename = 'movie_web_app/adapters/Data1000Movies.csv'
    file_reader = MovieFileCSVReader(filename)
    assert len(file_reader.get_genre_name("sci fi")) == 120
Example #4
0
def test_search_title_normal1():
    filename = 'movie_web_app/adapters/Data1000Movies.csv'
    file_reader = MovieFileCSVReader(filename)
    assert len(file_reader.get_movie_title("pirat")) == 3
Example #5
0
def test_search_director_fuzzy3():
    filename = 'movie_web_app/adapters/Data1000Movies.csv'
    file_reader = MovieFileCSVReader(filename)
    assert len(file_reader.get_director_name("James GGunn")) == 3
Example #6
0
def test_search_title_fuzzy3():
    filename = 'movie_web_app/adapters/Data1000Movies.csv'
    file_reader = MovieFileCSVReader(filename)
    assert file_reader.get_movie_title("the avengerss") == [Movie("The Avengers", 2012)]
Example #7
0
def test_movie_director():
    filename = 'movie_web_app/adapters/Data1000Movies.csv'
    file_reader = MovieFileCSVReader(filename)
    assert file_reader.dataset_of_movies[0].director == Director("James Gunn")
Example #8
0
def test_movie_genre():
    filename = 'movie_web_app/adapters/Data1000Movies.csv'
    file_reader = MovieFileCSVReader(filename)
    assert file_reader.dataset_of_movies[0].genres == [Genre("Action"), Genre("Adventure"), Genre("Sci-Fi")]
Example #9
0
def test_movie_actor():
    filename = 'movie_web_app/adapters/Data1000Movies.csv'
    file_reader = MovieFileCSVReader(filename)
    assert file_reader.dataset_of_movies[0].actors == [Actor("Chris Pratt"), Actor("Vin Diesel"), Actor("Bradley Cooper"), Actor("Zoe Saldana")]
Example #10
0
def test_movie_metascore_NA():
    filename = 'movie_web_app/adapters/Data1000Movies.csv'
    file_reader = MovieFileCSVReader(filename)
    assert file_reader.dataset_of_movies[25].metascore == 0