File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99
1010def test_video_comments (mocker ):
11+ """Test case for fetching video comments and verifying the output.
12+
13+ This test mocks the YouTube API to simulate fetching comments for a video,
14+ then compares the generated CSV output with expected comments.
15+ """
1116 youtube_mock = mocker .patch ("youtool.commands.video_comments.YouTube" )
1217 video_id = "video_id_mock"
1318
@@ -30,6 +35,11 @@ def test_video_comments(mocker):
3035
3136
3237def test_video_comments_with_file_output (mocker , tmp_path ):
38+ """Test case for fetching video comments and saving them to a CSV file.
39+
40+ This test mocks the YouTube API to simulate fetching comments for a video,
41+ then saves the comments to a temporary CSV file.
42+ """
3343 youtube_mock = mocker .patch ("youtool.commands.video_comments.YouTube" )
3444 video_id = "video_id_mock"
3545
You can’t perform that action at this time.
0 commit comments