Added tests
All checks were successful
Build Ragnar anti spam bot / Build (push) Successful in 57s

This commit is contained in:
retoor 2024-11-27 10:56:37 +01:00
parent 42eca170a6
commit 8b4d553772
5 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1 @@
from ragnar.tests.bot import *

Binary file not shown.

Binary file not shown.

16
src/ragnar/tests/bot.py Normal file
View File

@ -0,0 +1,16 @@
import unittest
from ragnar.bot import Bot
class BotTestCase(unittest.TestCase):
def setUp(self):
self.bot = Bot("slutty", "butty")
return super().setUp()
def clean_rant_text(self, text):
return text.replace(" ", "")
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."
self.assertTrue(self.bot.is_sus_rant(42, rant_text))

0
tiggers.js Normal file
View File