From 8b4d553772a43d5e253d1c7d863d99d7dfb0b486 Mon Sep 17 00:00:00 2001 From: retoor Date: Wed, 27 Nov 2024 10:56:37 +0100 Subject: [PATCH] Added tests --- src/ragnar/tests/__init__.py | 1 + .../tests/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 192 bytes .../tests/__pycache__/bot.cpython-312.pyc | Bin 0 -> 1339 bytes src/ragnar/tests/bot.py | 16 ++++++++++++++++ tiggers.js | 0 5 files changed, 17 insertions(+) create mode 100644 src/ragnar/tests/__init__.py create mode 100644 src/ragnar/tests/__pycache__/__init__.cpython-312.pyc create mode 100644 src/ragnar/tests/__pycache__/bot.cpython-312.pyc create mode 100644 src/ragnar/tests/bot.py create mode 100644 tiggers.js diff --git a/src/ragnar/tests/__init__.py b/src/ragnar/tests/__init__.py new file mode 100644 index 0000000..98a0ce5 --- /dev/null +++ b/src/ragnar/tests/__init__.py @@ -0,0 +1 @@ +from ragnar.tests.bot import * diff --git a/src/ragnar/tests/__pycache__/__init__.cpython-312.pyc b/src/ragnar/tests/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cea95e224662beaa8a1a298bf320de7cd910f67d GIT binary patch literal 192 zcmX@j%ge<81plA8rON^7#~=<2FhLog`GAb+3@HpLj5!QznHU)=nKYSSf+RH=Z!v25 z0ZDThi1C4$k&*E(gIp0CkOKgH Cc`|?i literal 0 HcmV?d00001 diff --git a/src/ragnar/tests/__pycache__/bot.cpython-312.pyc b/src/ragnar/tests/__pycache__/bot.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..836ad6832889e405869a59b3530078e68be71b60 GIT binary patch literal 1339 zcmaJ>&2Q936o2EjH_j$u)dZ@P&@xg2iXmh}l~$EV5K1I^<50rIhmIV3@+I$jnHke; zw5T~mYE}g$mn!rGM^G;PKe!}{Dv*H_>H(>Ts-YFisc-Dv%~B!W;mvz*-kay&`|#7g zz5*Z>{=B~U2LX7kl@?h|;cy0p9S9&GA-MW9LQ*zdgMb0wLXg{lz~r!!Zv`HoySYqu z%^Gp6H(I&jkR&$~DgW3D@SThfFW~tTCgb3e09<1e7DzxgY&RDe8{nEcnQLvrDsl5S z!7-B_d}@wMHS0<4BZ4-WDCz9!*Z)FxK(%iJ5*WM9lyzWjyV5Z!HAo%q_W|rSbxf7J zk>q6+slGA4C8x_&fST8hfN zB)EzqQL2h)h5JgDgtu7nL`e$2B`U-uOZfD7wI+Hnc+rlduvKr= zAIv`LKPZmu*(0Ke_V>D~XDsdN_bA{@lDpWc4}CsbJ0YXDrj^!AXKKm=qfT1Wu-hyI zftv34+QM8!5sRqMawItQ=A&5AC>B(5ac9}*l1756h)REn2XTlV)Q>7M4wa{tqso}p zl;ITXYWY~_A_08_*cJEfPQG8%N zw12gq4UX*(jy?YFx6cj+ul#OLrTuZb5}UD#SLTc*1;)yet^~@xjNOjCFuO@-Se(L# z#gInU*IW&shaqDQ5x8w2b@{KQLnL&kQlf~67 z9aol>hL#kvbsER*$yU^!YyKfp-zSj8X{bl`RQA1Bg$AwjryKQGju7$!im%}G+k6k1 S-X49{KfK>R{12d#hW`hL(mg8x literal 0 HcmV?d00001 diff --git a/src/ragnar/tests/bot.py b/src/ragnar/tests/bot.py new file mode 100644 index 0000000..57e8365 --- /dev/null +++ b/src/ragnar/tests/bot.py @@ -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)) diff --git a/tiggers.js b/tiggers.js new file mode 100644 index 0000000..e69de29