Exemple #1
0
def dict_to_movie(dict):
    movie = Movie(dict.title, dict.release_year)
    movie.rank = dict.rank
    movie.description = dict.description
    movie.director = dict_to_director(dict.director)
    movie.actors = dict_to_actors(dict.actors)
    movie.genres = dict_to_genres(dict.genres)
    movie.runtime_minutes = dict.runtime_minutes
    movie.rating = dict.rating
    movie.votes = dict.votes
    movie.revenue = dict.revenue
    movie.metascore = dict.metascore
    return movie
Exemple #2
0
def test_add_actors():
    m1 = Movie("wow", 0)
    m1.actors = [Actor("a"), Actor("b"), Actor("c")]
    assert (m1.actors == [Actor("a"), Actor("b"), Actor("c")])