Skip to content

Commit d5ca02f

Browse files
committed
Fix test failing because music channel could be Vevo
In yt stream extractor test. The Vevo and the normal music channel are equivalent, so Youtube picks one of them at random, and in playerResponse the channel id is Vevo's one.
1 parent 1689037 commit d5ca02f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/stream/YoutubeStreamExtractorDefaultTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ public void testGetUploadDate() throws ParsingException, ParseException {
124124

125125
@Test
126126
public void testGetUploaderUrl() throws ParsingException {
127-
assertEquals("https://www.youtube.com/channel/UCsRM0YB_dabtEPGPTKo-gcw", extractor.getUploaderUrl());
127+
String url = extractor.getUploaderUrl();
128+
if (!url.equals("https://www.youtube.com/channel/UCsRM0YB_dabtEPGPTKo-gcw") &&
129+
!url.equals("https://www.youtube.com/channel/UComP_epzeKzvBX156r6pm1Q")) {
130+
fail("Uploader url is neither the music channel one nor the Vevo one");
131+
}
128132
}
129133

130134
@Test

0 commit comments

Comments
 (0)