From 7268e93a62245e119c1d4456ce5a9c141071f9d5 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Sat, 23 Nov 2024 21:13:33 +0000 Subject: Update invite regex test cases --- tests/pydis_core/utils/test_regex.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/pydis_core/utils/test_regex.py b/tests/pydis_core/utils/test_regex.py index 1cf90711..79c1d743 100644 --- a/tests/pydis_core/utils/test_regex.py +++ b/tests/pydis_core/utils/test_regex.py @@ -35,8 +35,6 @@ class UtilsRegexTests(unittest.TestCase): self.assertEqual(match_regex("www.discord.com/invite/python"), "python") self.assertEqual(match_regex("discordapp.com/invite/python"), "python") self.assertEqual(match_regex("discord.me/python"), "python") - self.assertEqual(match_regex("discord.li/python"), "python") - self.assertEqual(match_regex("discord.io/python"), "python") self.assertEqual(match_regex(".gg/python"), "python") self.assertEqual(match_regex("discord.gg/python/but/extra"), "python/but/extra") @@ -56,9 +54,17 @@ class UtilsRegexTests(unittest.TestCase): self.assertEqual(match_regex("another string"), None) self.assertEqual(match_regex("https://pythondiscord.com"), None) + self.assertEqual(match_regex("https://tenor.com/view/cat-scream-cat-rage-gif-8639900204413677493"), None) + self.assertEqual(match_regex("https://paste.pythondiscord.com/1234"), None) self.assertEqual(match_regex("https://discord.com"), None) self.assertEqual(match_regex("https://discord.gg"), None) self.assertEqual(match_regex("https://discord.gg/ python"), None) + self.assertEqual(search_regex("https://discord.com/developers/applications"), None) + self.assertEqual( + search_regex( + "https://discord.com/channels/267624335836053506/305126844661760000/1309985927287930892" + ), None + ) self.assertEqual(search_regex("https://discord.com with whitespace"), None) self.assertEqual(search_regex(" https://discord.com "), None) -- cgit v1.2.3