Esempio n. 1
0
 def testGetMovieActorsForYear(self):
     """
     Tests finding actors for a given year
     """
     graph = Graph()
     graph.parseFile(TESTFILE)
     tmp_movie = Movies("BlahBlah", "1980", "$121,890,708",
                        "Robert Redford")
     tmp_actor = Actors("Freeman Blah", 80, "BlahBlah")
     graph.add_movie(tmp_movie)
     graph.add_actor(tmp_actor)
     graph.add_edge(Edges(tmp_actor.name, tmp_movie.name, 222759050.0))
     graph.get_movie_actors_for_year("1980")
Esempio n. 2
0
        """
        Tests finding oldest X actors
        """
        graph = Graph()
        graph.parseFile(TESTFILE)
        tmp_movie = Movies("BlahBlah", "1980", "$121,890,708",
                           "Robert Redford")
        tmp_actor = Actors("Freeman Blah", 78, "BlahBlah")
        graph.add_movie(tmp_movie)
        graph.add_actor(tmp_actor)
        graph.add_edge(Edges(tmp_actor.name, tmp_movie.name, 222759050.0))
        graph.find_oldest_actors(2)


if __name__ == "__main__":
    #unittest.main()
    graph = Graph()
    graph.parseFile(TESTFILE)
    tmp_movie = Movies("BlahBlah", "1980", "$121,890,708", "Robert Redford")
    tmp_actor = Actors("Freeman Blah", 78, "BlahBlah")
    graph.add_movie(tmp_movie)
    graph.add_actor(tmp_actor)
    graph.add_edge(Edges(tmp_actor.name, tmp_movie.name, 222759050.0))
    graph.get_movies_for_actor("Faye Dunaway")
    graph.get_movies_for_year("1980")
    graph.get_movie_actors_for_year("1980")
    graph.get_actors_for_movie("The Thomas Crown Affair")
    graph.get_movie_gross("The Thomas Crown Affair")
    graph.find_highest_grossing_actors(5)
    graph.find_oldest_actors(2)