Added some tests
All checks were successful
Build Ragnar anti spam bot / Build (push) Successful in 1m1s
All checks were successful
Build Ragnar anti spam bot / Build (push) Successful in 1m1s
This commit is contained in:
parent
4420b3a2d2
commit
6f856ad857
Binary file not shown.
Binary file not shown.
@ -14,3 +14,11 @@ class BotTestCase(unittest.TestCase):
|
|||||||
def test_is_sus_rant_regex_match(self):
|
def test_is_sus_rant_regex_match(self):
|
||||||
rant_text = "To learn more about our services or to schedule a consultation, contact us at +1 (604) 200-0581 today."
|
rant_text = "To learn more about our services or to schedule a consultation, contact us at +1 (604) 200-0581 today."
|
||||||
self.assertTrue(self.bot.is_sus_rant(42, rant_text))
|
self.assertTrue(self.bot.is_sus_rant(42, rant_text))
|
||||||
|
|
||||||
|
def test_is_sus_rant_regex_url_match_dot_slash(self):
|
||||||
|
rant_text = "Visit Now: thesleepcompany.in/pages/all-chairs"
|
||||||
|
self.assertTrue(self.bot.is_sus_rant(42, rant_text))
|
||||||
|
|
||||||
|
def test_is_sus_rant_regex_url_match_http_or_www(self):
|
||||||
|
rant_text = "http:// www . google . nl"
|
||||||
|
self.assertTrue(self.bot.is_sus_rant(42, rant_text))
|
||||||
|
Loading…
Reference in New Issue
Block a user