Skip to content

Commit 279f3a2

Browse files
committed
[YouTube] Fix mix tests with invalid video ids
Replaces mix tests based on a strange mix type RDQM{videoId} (only reference I could find is ytdl-org/youtube-dl#26228) and with an invalid video id of 13 characters (the first two characters were QM, but even after removing QM there still wasn't a video available at that id). Also updates mocks.
1 parent d660c04 commit 279f3a2

25 files changed

Lines changed: 654 additions & 1584 deletions

extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeMixPlaylistExtractorTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public class YoutubeMixPlaylistExtractorTest {
3535
private static YoutubeMixPlaylistExtractor extractor;
3636

3737
public static class Mix {
38-
private static final String VIDEO_ID = "QMVCAPd5cwBcg";
39-
private static final String VIDEO_TITLE = "Mix – ";
38+
private static final String VIDEO_ID = "UtF6Jej8yb4";
39+
private static final String VIDEO_TITLE = "Avicii - The Nights";
4040

4141
@BeforeAll
4242
public static void setUp() throws Exception {
@@ -128,10 +128,10 @@ void getPlaylistType() throws ParsingException {
128128

129129
public static class MixWithIndex {
130130

131-
private static final String VIDEO_ID = "QMVCAPd5cwBcg";
132-
private static final String VIDEO_TITLE = "Mix – ";
131+
private static final String VIDEO_ID = "UtF6Jej8yb4";
132+
private static final String VIDEO_TITLE = "Avicii - The Nights";
133133
private static final int INDEX = 4;
134-
private static final String VIDEO_ID_NUMBER_4 = "lWA2pjMjpBs";
134+
private static final String VIDEO_ID_NUMBER_4 = "ebXbLfLACGM";
135135

136136
@BeforeAll
137137
public static void setUp() throws Exception {

extractor/src/test/resources/org/schabi/newpipe/extractor/services/youtube/extractor/mix/channelMix/generated_mock_0.json

Lines changed: 76 additions & 24 deletions
Large diffs are not rendered by default.

extractor/src/test/resources/org/schabi/newpipe/extractor/services/youtube/extractor/mix/channelMix/generated_mock_1.json

Lines changed: 23 additions & 5 deletions
Large diffs are not rendered by default.

extractor/src/test/resources/org/schabi/newpipe/extractor/services/youtube/extractor/mix/channelMix/generated_mock_2.json

Lines changed: 0 additions & 296 deletions
This file was deleted.

extractor/src/test/resources/org/schabi/newpipe/extractor/services/youtube/extractor/mix/invalid/generated_mock_0.json

Lines changed: 48 additions & 23 deletions
Large diffs are not rendered by default.

extractor/src/test/resources/org/schabi/newpipe/extractor/services/youtube/extractor/mix/invalid/generated_mock_1.json

Lines changed: 29 additions & 13 deletions
Large diffs are not rendered by default.

extractor/src/test/resources/org/schabi/newpipe/extractor/services/youtube/extractor/mix/invalid/generated_mock_2.json

Lines changed: 0 additions & 267 deletions
This file was deleted.

extractor/src/test/resources/org/schabi/newpipe/extractor/services/youtube/extractor/mix/mix/generated_mock_0.json

Lines changed: 59 additions & 22 deletions
Large diffs are not rendered by default.

extractor/src/test/resources/org/schabi/newpipe/extractor/services/youtube/extractor/mix/mix/generated_mock_1.json

Lines changed: 44 additions & 30 deletions
Large diffs are not rendered by default.

extractor/src/test/resources/org/schabi/newpipe/extractor/services/youtube/extractor/mix/mix/generated_mock_2.json

Lines changed: 44 additions & 29 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)