From 6f856ad85799fd6222230306459b7408ef432d1e Mon Sep 17 00:00:00 2001 From: retoor Date: Thu, 28 Nov 2024 11:43:09 +0100 Subject: [PATCH] Added some tests --- .../__pycache__/__init__.cpython-312.pyc | Bin 192 -> 192 bytes .../tests/__pycache__/bot.cpython-312.pyc | Bin 1339 -> 2050 bytes src/ragnar/tests/bot.py | 8 ++++++++ 3 files changed, 8 insertions(+) diff --git a/src/ragnar/tests/__pycache__/__init__.cpython-312.pyc b/src/ragnar/tests/__pycache__/__init__.cpython-312.pyc index cea95e224662beaa8a1a298bf320de7cd910f67d..2625e6b3d1c90adba5054a3fdfc97c14c68220b0 100644 GIT binary patch delta 21 bcmX@Wcz}`jG%qg~0}yz;aZ8t<$h#Q;JsJhj delta 21 bcmX@Wcz}`jG%qg~0}%Xw=9Vruk#{oyLZk+O diff --git a/src/ragnar/tests/__pycache__/bot.cpython-312.pyc b/src/ragnar/tests/__pycache__/bot.cpython-312.pyc index 836ad6832889e405869a59b3530078e68be71b60..4fa27e8aa659c93db95762ca74edfbe8a4e5d795 100644 GIT binary patch delta 484 zcmdnZ)g-`onwOW00SGiaJ<|P|C-OBjnoXRfDwe|1!Vtxl!U`nWI~Xb$qd0;YG}$&D zM#hzsdzs~dSgBX7bK>q7V9VG_vdAWj~LVA9FdQK{kk(YzdVLAjI1~N82 zzbGDPY?a02SIo-F2sa_gi6Og6ALuGoM$XA@Ec)ECK#3xG5TQ7^jKx@12FU!;!tjNK ziBxTQa3oXFSAs5NntDpveMafY#_YzzLO?@)v@m>OVPcj4#KFj_`i*UJGkbu( u3Q(L8h>K-`#0O?ZM#kF={C63ozOZpK+D_28E~I=>Nck%RkW<7DQ~>}>B_zE7 diff --git a/src/ragnar/tests/bot.py b/src/ragnar/tests/bot.py index 57e8365..011f91f 100644 --- a/src/ragnar/tests/bot.py +++ b/src/ragnar/tests/bot.py @@ -14,3 +14,11 @@ class BotTestCase(unittest.TestCase): 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)) + + 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))