--- /dev/null
+# -*- coding: utf-8 -*-\r
+"""Unit tests for rss2email.\r
+\r
+These tests make sure that rss2email works as it should. If you\r
+find a bug, the best way to express it is as a test\r
+case like this that fails."""\r
+\r
+import unittest\r
+from rss2email import *\r
+\r
+class Test_validateEmail(unittest.TestCase):\r
+ """"""\r
+ def test_valid_email(self):\r
+ email = validateEmail("valid@example.com", "planb@example.com")\r
+ self.assertEqual(email, "valid@example.com")\r
+\r
+ def test_no_mail_server(self):\r
+ email = validateEmail("invalid", "planb@example.com")\r
+ self.assertEqual(email, "planb@example.com")\r
+\r
+ def test_no_email_name(self):\r
+ email = validateEmail("@invalid", "planb@example.com")\r
+ self.assertEqual(email, "planb@example.com")\r
+\r
+ def test_no_at(self):\r
+ email = validateEmail("invalid", "planb@example.com")\r
+ self.assertEqual(email, "planb@example.com")\r
+\r
+if __name__ == '__main__':\r
+ unittest.main()\r