1919 * Test for {@link PeertubeChannelExtractor}
2020 */
2121public class PeertubeChannelExtractorTest {
22- public static class DanDAugeTutoriels implements BaseChannelExtractorTest {
22+
23+ public static class LaQuadratureDuNet implements BaseChannelExtractorTest {
2324 private static PeertubeChannelExtractor extractor ;
2425
2526 @ BeforeClass
2627 public static void setUp () throws Exception {
2728 NewPipe .init (DownloaderTestImpl .getInstance ());
2829 // setting instance might break test when running in parallel
29- PeerTube .setInstance (new PeertubeInstance ("https://peertube.mastodon.host " , "PeerTube on Mastodon.host " ));
30+ PeerTube .setInstance (new PeertubeInstance ("https://framatube.org " , "Framatube " ));
3031 extractor = (PeertubeChannelExtractor ) PeerTube
31- .getChannelExtractor ("https://peertube.mastodon.host /video-channels/7682d9f2-07be-4622-862e-93ec812e2ffa " );
32+ .getChannelExtractor ("https://framatube.org /video-channels/lqdn_channel@video.lqdn.fr/videos " );
3233 extractor .fetchPage ();
3334 }
3435
@@ -43,22 +44,22 @@ public void testServiceId() {
4344
4445 @ Test
4546 public void testName () throws ParsingException {
46- assertEquals ("Dan d'Auge tutoriels " , extractor .getName ());
47+ assertEquals ("La Quadrature du Net " , extractor .getName ());
4748 }
4849
4950 @ Test
5051 public void testId () throws ParsingException {
51- assertEquals ("video-channels/7682d9f2-07be-4622-862e-93ec812e2ffa " , extractor .getId ());
52+ assertEquals ("video-channels/lqdn_channel@video.lqdn.fr " , extractor .getId ());
5253 }
5354
5455 @ Test
5556 public void testUrl () throws ParsingException {
56- assertEquals ("https://peertube.mastodon.host /video-channels/7682d9f2-07be-4622-862e-93ec812e2ffa " , extractor .getUrl ());
57+ assertEquals ("https://framatube.org /video-channels/lqdn_channel@video.lqdn.fr " , extractor .getUrl ());
5758 }
5859
5960 @ Test
6061 public void testOriginalUrl () throws ParsingException {
61- assertEquals ("https://peertube.mastodon.host /video-channels/7682d9f2-07be-4622-862e-93ec812e2ffa " , extractor .getOriginalUrl ());
62+ assertEquals ("https://framatube.org /video-channels/lqdn_channel@video.lqdn.fr/videos " , extractor .getOriginalUrl ());
6263 }
6364
6465 /*//////////////////////////////////////////////////////////////////////////
@@ -86,12 +87,12 @@ public void testDescription() throws ParsingException {
8687
8788 @ Test
8889 public void testParentChannelName () throws ParsingException {
89- assertEquals ("libux " , extractor .getParentChannelName ());
90+ assertEquals ("lqdn " , extractor .getParentChannelName ());
9091 }
9192
9293 @ Test
9394 public void testParentChannelUrl () throws ParsingException {
94- assertEquals ("https://peertube.mastodon.host /accounts/libux " , extractor .getParentChannelUrl ());
95+ assertEquals ("https://video.lqdn.fr /accounts/lqdn " , extractor .getParentChannelUrl ());
9596 }
9697
9798 @ Test
@@ -111,25 +112,26 @@ public void testBannerUrl() throws ParsingException {
111112
112113 @ Test
113114 public void testFeedUrl () throws ParsingException {
114- assertEquals ("https://peertube.mastodon.host /feeds/videos.xml?videoChannelId=1361 " , extractor .getFeedUrl ());
115+ assertEquals ("https://framatube.org /feeds/videos.xml?videoChannelId=1126 " , extractor .getFeedUrl ());
115116 }
116117
117118 @ Test
118119 public void testSubscriberCount () throws ParsingException {
119- assertTrue ("Wrong subscriber count" , extractor .getSubscriberCount () >= 4 );
120+ assertTrue ("Wrong subscriber count" , extractor .getSubscriberCount () >= 230 );
120121 }
121122 }
122123
123- public static class Divers implements BaseChannelExtractorTest {
124+ public static class ChatSceptique implements BaseChannelExtractorTest {
125+
124126 private static PeertubeChannelExtractor extractor ;
125127
126128 @ BeforeClass
127129 public static void setUp () throws Exception {
128130 NewPipe .init (DownloaderTestImpl .getInstance ());
129131 // setting instance might break test when running in parallel
130- PeerTube .setInstance (new PeertubeInstance ("https://peertube.mastodon.host " , "PeerTube on Mastodon.host " ));
132+ PeerTube .setInstance (new PeertubeInstance ("https://framatube.org " , "Framatube " ));
131133 extractor = (PeertubeChannelExtractor ) PeerTube
132- .getChannelExtractor ("https://peertube.mastodon.host /api/v1/video-channels/35080089-79b6-45fc-96ac-37e4d46a4457 " );
134+ .getChannelExtractor ("https://framatube.org /api/v1/video-channels/chatsceptique@skeptikon.fr " );
133135 extractor .fetchPage ();
134136 }
135137
@@ -154,22 +156,22 @@ public void testServiceId() {
154156
155157 @ Test
156158 public void testName () throws ParsingException {
157- assertEquals ("Divers " , extractor .getName ());
159+ assertEquals ("Chat Sceptique " , extractor .getName ());
158160 }
159161
160162 @ Test
161163 public void testId () throws ParsingException {
162- assertEquals ("video-channels/35080089-79b6-45fc-96ac-37e4d46a4457 " , extractor .getId ());
164+ assertEquals ("video-channels/chatsceptique@skeptikon.fr " , extractor .getId ());
163165 }
164166
165167 @ Test
166168 public void testUrl () throws ParsingException {
167- assertEquals ("https://peertube.mastodon.host /video-channels/35080089-79b6-45fc-96ac-37e4d46a4457 " , extractor .getUrl ());
169+ assertEquals ("https://framatube.org /video-channels/chatsceptique@skeptikon.fr " , extractor .getUrl ());
168170 }
169171
170172 @ Test
171173 public void testOriginalUrl () throws ParsingException {
172- assertEquals ("https://peertube.mastodon.host /api/v1/video-channels/35080089-79b6-45fc-96ac-37e4d46a4457 " , extractor .getOriginalUrl ());
174+ assertEquals ("https://framatube.org /api/v1/video-channels/chatsceptique@skeptikon.fr " , extractor .getOriginalUrl ());
173175 }
174176
175177 /*//////////////////////////////////////////////////////////////////////////
@@ -197,12 +199,12 @@ public void testDescription() throws ParsingException {
197199
198200 @ Test
199201 public void testParentChannelName () throws ParsingException {
200- assertEquals ("booteille " , extractor .getParentChannelName ());
202+ assertEquals ("nathan " , extractor .getParentChannelName ());
201203 }
202204
203205 @ Test
204206 public void testParentChannelUrl () throws ParsingException {
205- assertEquals ("https://peertube.mastodon.host /accounts/booteille " , extractor .getParentChannelUrl ());
207+ assertEquals ("https://skeptikon.fr /accounts/nathan " , extractor .getParentChannelUrl ());
206208 }
207209
208210 @ Test
@@ -215,20 +217,19 @@ public void testAvatarUrl() throws ParsingException {
215217 assertIsSecureUrl (extractor .getAvatarUrl ());
216218 }
217219
218- @ Ignore
219220 @ Test
220221 public void testBannerUrl () throws ParsingException {
221- assertIsSecureUrl (extractor .getBannerUrl ());
222+ assertNull (extractor .getBannerUrl ());
222223 }
223224
224225 @ Test
225226 public void testFeedUrl () throws ParsingException {
226- assertEquals ("https://peertube.mastodon.host /feeds/videos.xml?videoChannelId=1227 " , extractor .getFeedUrl ());
227+ assertEquals ("https://framatube.org /feeds/videos.xml?videoChannelId=137 " , extractor .getFeedUrl ());
227228 }
228229
229230 @ Test
230231 public void testSubscriberCount () throws ParsingException {
231- assertTrue ("Wrong subscriber count" , extractor .getSubscriberCount () >= 2 );
232+ assertTrue ("Wrong subscriber count" , extractor .getSubscriberCount () >= 700 );
232233 }
233234 }
234235}
0 commit comments