Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
duogenesis committed Jan 1, 2025
1 parent e95d41a commit 1cdaa4c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
34 changes: 34 additions & 0 deletions antiabuse/antirude/displayname/test_init.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import unittest
from antiabuse.antirude.displayname import is_rude

class TestIsRude(unittest.TestCase):

def test_rude_strings(self):
self.assertTrue(
is_rude("You're a nigg"))

self.assertTrue(
is_rude("You're a 𝖓𝖎𝖌𝖌𝖊𝖗"))

self.assertTrue(
is_rude("ywnbaw is an acronym"))

def test_inrude_strings(self):
self.assertFalse(
is_rude("go hug urself please"))

self.assertFalse(
is_rude("I respect you"))

self.assertFalse(
is_rude("Who're you listening to?"))

self.assertFalse(
is_rude("Can u c my pfp?"))

self.assertFalse(
is_rude("I am therapist"))


if __name__ == '__main__':
unittest.main()
3 changes: 3 additions & 0 deletions antiabuse/antirude/profile/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ def test_rude_strings(self):
self.assertTrue(
is_rude("You're a nigg"))

self.assertTrue(
is_rude("You're a 𝖓𝖎𝖌𝖌𝖊𝖗"))

self.assertTrue(
is_rude("ywnbaw is an acronym"))

Expand Down

0 comments on commit 1cdaa4c

Please sign in to comment.