fixed tests
This commit is contained in:
parent
36139558c6
commit
c220700c94
|
@ -44,7 +44,7 @@ public class MediaCCCSearchExtractorEventsTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testServiceId() throws Exception {
|
public void testServiceId() throws Exception {
|
||||||
assertEquals(2, extractor.getServiceId());
|
assertEquals(3, extractor.getServiceId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -28,6 +28,8 @@ public class PeertubeTrendingExtractorTest {
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void setUp() throws Exception {
|
public static void setUp() throws Exception {
|
||||||
NewPipe.init(Downloader.getInstance(), new Localization("GB", "en"));
|
NewPipe.init(Downloader.getInstance(), new Localization("GB", "en"));
|
||||||
|
// setting instance might break test when running in parallel
|
||||||
|
PeerTube.setInstance("https://peertube.mastodon.host", "PeerTube on Mastodon.host");
|
||||||
extractor = PeerTube
|
extractor = PeerTube
|
||||||
.getKioskList()
|
.getKioskList()
|
||||||
.getExtractorById("Trending", null);
|
.getExtractorById("Trending", null);
|
||||||
|
|
|
@ -2,6 +2,7 @@ package org.schabi.newpipe.extractor.services.peertube;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
|
import static org.schabi.newpipe.extractor.ServiceList.PeerTube;
|
||||||
|
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -20,6 +21,8 @@ public class PeertubeTrendingLinkHandlerFactoryTest {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void setUp() throws Exception {
|
public static void setUp() throws Exception {
|
||||||
|
// setting instance might break test when running in parallel
|
||||||
|
PeerTube.setInstance("https://peertube.mastodon.host", "PeerTube on Mastodon.host");
|
||||||
LinkHandlerFactory = new PeertubeTrendingLinkHandlerFactory();
|
LinkHandlerFactory = new PeertubeTrendingLinkHandlerFactory();
|
||||||
NewPipe.init(Downloader.getInstance(), new Localization("GB", "en"));
|
NewPipe.init(Downloader.getInstance(), new Localization("GB", "en"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue