Skip to content

Commit f45b561

Browse files
committed
Unignore YoutubeChannelLocalizationTest
With mocks time is not a concern anymore
1 parent 19737e0 commit f45b561

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
package org.schabi.newpipe.extractor.services.youtube;
22

3-
import org.junit.Ignore;
43
import org.junit.Test;
5-
import org.schabi.newpipe.downloader.DownloaderTestImpl;
4+
import org.schabi.newpipe.downloader.DownloaderFactory;
65
import org.schabi.newpipe.extractor.ListExtractor;
76
import org.schabi.newpipe.extractor.NewPipe;
87
import org.schabi.newpipe.extractor.channel.ChannelExtractor;
@@ -23,14 +22,15 @@
2322
/**
2423
* A class that tests multiple channels and ranges of "time ago".
2524
*/
26-
@Ignore("Should be ran manually from time to time, as it's too time consuming.")
2725
public class YoutubeChannelLocalizationTest {
28-
private static final boolean DEBUG = true;
26+
private static final String RESOURCE_PATH = DownloaderFactory.RESOURCE_PATH + "services/youtube/extractor/channel/";
27+
private static final boolean DEBUG = false;
2928
private final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
3029

3130
@Test
3231
public void testAllSupportedLocalizations() throws Exception {
33-
NewPipe.init(DownloaderTestImpl.getInstance());
32+
YoutubeParsingHelper.resetClientVersionAndKey();
33+
NewPipe.init(new DownloaderFactory().getDownloader(RESOURCE_PATH + "localization"));
3434

3535
testLocalizationsFor("https://www.youtube.com/user/NBCNews");
3636
testLocalizationsFor("https://www.youtube.com/channel/UCcmpeVbSSQlZRvHfdC-CRwg/videos");

0 commit comments

Comments
 (0)