def test_watch_list_add_same_movie(): watchlist3 = WatchList() watchlist3.add_movie(Movie("Moana", 2016)) watchlist3.add_movie(Movie("Moana", 2016)) assert repr(watchlist3.first_movie_in_watchlist()) == "<Movie Moana, 2016>"
def test_watch_list_remove_movie(): watchlist5 = WatchList() watchlist5.add_movie(Movie("Moana", 2016)) watchlist5.remove_movie(Movie("Transformers", 2007)) assert watchlist5.size() == 1 assert repr(watchlist5.first_movie_in_watchlist()) == "<Movie Moana, 2016>"
def test_watchlist_first_movie_in_watchlist(): watchlist = WatchList() assert watchlist.first_movie_in_watchlist() is None movie1 = Movie("Moana", 2016) watchlist.add_movie(movie1) assert watchlist.first_movie_in_watchlist() == movie1