diff --git a/modules/test/test_nsfw.py b/modules/test/test_nsfw.py new file mode 100644 index 0000000..a561c77 --- /dev/null +++ b/modules/test/test_nsfw.py @@ -0,0 +1,21 @@ +""" +test_nsfw.py - some things just aren't safe for work, the test cases +author: mutantmonkey +""" + +import re +import unittest +from mock import MagicMock, Mock +from modules.nsfw import nsfw + + +class TestNsfw(unittest.TestCase): + def setUp(self): + self.phenny = MagicMock() + + def test_nsfw(self): + input = Mock(group=lambda x: "test") + nsfw(self.phenny, input) + + self.phenny.say.assert_called_once_with( + "!!NSFW!! -> test <- !!NSFW!!")