Skip to content

Commit 7268e93

Browse files
committed
Update invite regex test cases
1 parent f801992 commit 7268e93

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/pydis_core/utils/test_regex.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ def test_discord_invite_positives(self):
3535
self.assertEqual(match_regex("www.discord.com/invite/python"), "python")
3636
self.assertEqual(match_regex("discordapp.com/invite/python"), "python")
3737
self.assertEqual(match_regex("discord.me/python"), "python")
38-
self.assertEqual(match_regex("discord.li/python"), "python")
39-
self.assertEqual(match_regex("discord.io/python"), "python")
4038
self.assertEqual(match_regex(".gg/python"), "python")
4139

4240
self.assertEqual(match_regex("discord.gg/python/but/extra"), "python/but/extra")
@@ -56,9 +54,17 @@ def test_discord_invite_negatives(self):
5654

5755
self.assertEqual(match_regex("another string"), None)
5856
self.assertEqual(match_regex("https://pythondiscord.com"), None)
57+
self.assertEqual(match_regex("https://tenor.com/view/cat-scream-cat-rage-gif-8639900204413677493"), None)
58+
self.assertEqual(match_regex("https://paste.pythondiscord.com/1234"), None)
5959
self.assertEqual(match_regex("https://discord.com"), None)
6060
self.assertEqual(match_regex("https://discord.gg"), None)
6161
self.assertEqual(match_regex("https://discord.gg/ python"), None)
62+
self.assertEqual(search_regex("https://discord.com/developers/applications"), None)
63+
self.assertEqual(
64+
search_regex(
65+
"https://discord.com/channels/267624335836053506/305126844661760000/1309985927287930892"
66+
), None
67+
)
6268

6369
self.assertEqual(search_regex("https://discord.com with whitespace"), None)
6470
self.assertEqual(search_regex(" https://discord.com "), None)

0 commit comments

Comments
 (0)