mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-29 00:10:35 +05:30
Fix PeerTube tests
This commit is contained in:
parent
e1b94c4148
commit
c892cfaafa
@ -133,7 +133,7 @@ public class PeertubeCommentsExtractorTest {
|
|||||||
public static void setUp() throws Exception {
|
public static void setUp() throws Exception {
|
||||||
NewPipe.init(DownloaderTestImpl.getInstance());
|
NewPipe.init(DownloaderTestImpl.getInstance());
|
||||||
extractor = (PeertubeCommentsExtractor) PeerTube
|
extractor = (PeertubeCommentsExtractor) PeerTube
|
||||||
.getCommentsExtractor("https://share.tube/w/vxu4uTstUBAUromWwXGHrq");
|
.getCommentsExtractor("https://framatube.org/w/kkGMgK9ZtnKfYAgnEtQxbv");
|
||||||
comments = extractor.getInitialPage();
|
comments = extractor.getInitialPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,16 +141,16 @@ public class PeertubeCommentsExtractorTest {
|
|||||||
void testGetComments() throws IOException, ExtractionException {
|
void testGetComments() throws IOException, ExtractionException {
|
||||||
assertFalse(comments.getItems().isEmpty());
|
assertFalse(comments.getItems().isEmpty());
|
||||||
final Optional<CommentsInfoItem> nestedCommentHeadOpt =
|
final Optional<CommentsInfoItem> nestedCommentHeadOpt =
|
||||||
findCommentWithId("9770", comments.getItems());
|
findCommentWithId("34293", comments.getItems());
|
||||||
assertTrue(nestedCommentHeadOpt.isPresent());
|
assertTrue(nestedCommentHeadOpt.isPresent());
|
||||||
assertTrue(findNestedCommentWithId("9773", nestedCommentHeadOpt.get()), "The nested comment replies were not found");
|
assertTrue(findNestedCommentWithId("34294", nestedCommentHeadOpt.get()), "The nested " +
|
||||||
|
"comment replies were not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testHasCreatorReply() {
|
void testHasCreatorReply() {
|
||||||
assertCreatorReply("9770", true);
|
// NOTE: There is currently no creator replied comment
|
||||||
assertCreatorReply("9852", false);
|
assertCreatorReply("34293", false);
|
||||||
assertCreatorReply("11239", false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void assertCreatorReply(final String id, final boolean expected) {
|
private static void assertCreatorReply(final String id, final boolean expected) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user