-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e95d41a
commit 1cdaa4c
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters