From c892cfaafa006235987f105be3198aaca3242c14 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Sun, 9 Feb 2025 21:40:05 +0100 Subject: [PATCH] Fix PeerTube tests --- .../peertube/PeertubeCommentsExtractorTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/peertube/PeertubeCommentsExtractorTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/peertube/PeertubeCommentsExtractorTest.java index 2663102f9..306b79d7b 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/peertube/PeertubeCommentsExtractorTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/peertube/PeertubeCommentsExtractorTest.java @@ -133,7 +133,7 @@ public class PeertubeCommentsExtractorTest { public static void setUp() throws Exception { NewPipe.init(DownloaderTestImpl.getInstance()); extractor = (PeertubeCommentsExtractor) PeerTube - .getCommentsExtractor("https://share.tube/w/vxu4uTstUBAUromWwXGHrq"); + .getCommentsExtractor("https://framatube.org/w/kkGMgK9ZtnKfYAgnEtQxbv"); comments = extractor.getInitialPage(); } @@ -141,16 +141,16 @@ public class PeertubeCommentsExtractorTest { void testGetComments() throws IOException, ExtractionException { assertFalse(comments.getItems().isEmpty()); final Optional nestedCommentHeadOpt = - findCommentWithId("9770", comments.getItems()); + findCommentWithId("34293", comments.getItems()); 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 void testHasCreatorReply() { - assertCreatorReply("9770", true); - assertCreatorReply("9852", false); - assertCreatorReply("11239", false); + // NOTE: There is currently no creator replied comment + assertCreatorReply("34293", false); } private static void assertCreatorReply(final String id, final boolean expected) {