Skip to content

Commit cdfcdb3

Browse files
committed
[YouTube] Update terminated channels tests
One of the tests had to be removed since I could not find a channel which has that message, and according to https://youtube.fandom.com/wiki/Termination#Ban_Messages that message is "deprecated" so maybe it does not exist anymore.
1 parent 400db43 commit cdfcdb3

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeChannelExtractorTest.java

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
*/
3636
public class YoutubeChannelExtractorTest {
3737

38+
/**
39+
* See <a href="https://youtube.fandom.com/wiki/Termination#Ban_Messages">here</a>
40+
* for a list of account termination messages.
41+
*/
3842
public static class NotAvailable implements InitYoutubeTest {
3943
@Test
4044
void deletedFetch() throws Exception {
@@ -67,7 +71,7 @@ void accountTerminatedTOSFetch() throws Exception {
6771
void accountTerminatedCommunityFetch() throws Exception {
6872
// "This account has been terminated for violating YouTube's Community Guidelines."
6973
final ChannelExtractor extractor =
70-
YouTube.getChannelExtractor("https://www.youtube.com/channel/UC0AuOxCr9TZ0TtEgL1zpIgA");
74+
YouTube.getChannelExtractor("https://www.youtube.com/channel/UC-nQp2ewj2Yeg5w7VyoVBwQ");
7175

7276
final AccountTerminatedException ex =
7377
assertThrows(AccountTerminatedException.class, extractor::fetchPage);
@@ -86,18 +90,6 @@ void accountTerminatedHateFetch() throws Exception {
8690
assertEquals(AccountTerminatedException.Reason.VIOLATION, ex.getReason());
8791
}
8892

89-
@Test
90-
void accountTerminatedBullyFetch() throws Exception {
91-
// "This account has been terminated due to multiple or severe violations
92-
// of YouTube's policy prohibiting content designed to harass, bully or threaten."
93-
final ChannelExtractor extractor =
94-
YouTube.getChannelExtractor("https://youtube.com/channel/UCB1o7_gbFp2PLsamWxFenBg");
95-
96-
final AccountTerminatedException ex =
97-
assertThrows(AccountTerminatedException.class, extractor::fetchPage);
98-
assertEquals(AccountTerminatedException.Reason.VIOLATION, ex.getReason());
99-
}
100-
10193
@Test
10294
void accountTerminatedSpamFetch() throws Exception {
10395
// "This account has been terminated due to multiple or severe violations

0 commit comments

Comments
 (0)