Skip to content

Commit 07a8129

Browse files
committed
fixed peertube search test
1 parent bd22b55 commit 07a8129

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

extractor/src/test/java/org/schabi/newpipe/extractor/services/peertube/search/PeertubeSearchQHTest.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@
33
import static org.junit.Assert.assertEquals;
44
import static org.schabi.newpipe.extractor.ServiceList.PeerTube;
55

6+
import org.junit.BeforeClass;
67
import org.junit.Test;
78

89
public class PeertubeSearchQHTest {
10+
11+
@BeforeClass
12+
public static void setUpClass() throws Exception {
13+
// setting instance might break test when running in parallel
14+
PeerTube.setInstance("https://peertube.mastodon.host", "PeerTube on Mastodon.host");
15+
}
916

1017
@Test
1118
public void testRegularValues() throws Exception {
@@ -15,4 +22,4 @@ public void testRegularValues() throws Exception {
1522
assertEquals("https://peertube.mastodon.host/api/v1/search/videos?search=G%C3%BCl%C3%BCm", PeerTube.getSearchQHFactory().fromQuery("Gülüm").getUrl());
1623
assertEquals("https://peertube.mastodon.host/api/v1/search/videos?search=%3Fj%24%29H%C2%A7B", PeerTube.getSearchQHFactory().fromQuery("?j$)H§B").getUrl());
1724
}
18-
}
25+
}

0 commit comments

Comments
 (0)