From a71ebace251421303a6c4278a37b77775c6d1502 Mon Sep 17 00:00:00 2001 From: adipai Date: Tue, 17 Oct 2023 14:24:11 -0400 Subject: [PATCH] Fixed bug in test suite --- test/test_util.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/test_util.py b/test/test_util.py index 992b90894..5c4186533 100644 --- a/test/test_util.py +++ b/test/test_util.py @@ -37,8 +37,8 @@ def test_create_colored_tags(self): """ Test case 2 """ - expected_result = 'Musical' + expected_result = 'Musical' result = create_colored_tags(['Musical']) self.assertTrue(result == expected_result) @@ -49,7 +49,15 @@ def test_create_movie_genres(self): expected_result = {'Toy Story (1995)': ['Animation', 'Comedy', 'Family'], \ 'Jumanji (1995)': [ 'Adventure', 'Fantasy', 'Family']} - movie_genre_df = pd.read_csv('../data/movies.csv').head(n=2) + + data = [["862", "Toy Story (1995)", "Animation|Comedy|Family", \ + "tt0114709", " ", "/rhIRbceoE9lR4veEXuwCC2wARtG.jpg", "81"], \ + ["8844", "Jumanji (1995)", "Adventure|Fantasy|Family", "tt0113497", " ", \ + "/vzmL6fP7aPKNKPRTFnZmiUfciyV.jpg", "104"]] + + movie_genre_df = pd.DataFrame(data, columns=[ + 'movieId', 'title', 'genres', 'imdb_id', 'overview', 'poster_path', 'runtime']) + result = create_movie_genres(movie_genre_df) self.assertTrue(result == expected_result)