From 508ad7ceec8d83c6d211f26f9d4d3c3cebfdbf1f Mon Sep 17 00:00:00 2001 From: William Grant Date: Wed, 9 Mar 2011 18:47:11 +1100 Subject: [PATCH] Add a couple of tests for fold(). One disabled, because the function is broken. --- dkim/tests/__init__.py | 0 dkim/tests/test_dkim.py | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 dkim/tests/__init__.py create mode 100644 dkim/tests/test_dkim.py diff --git a/dkim/tests/__init__.py b/dkim/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/dkim/tests/test_dkim.py b/dkim/tests/test_dkim.py new file mode 100644 index 0000000..c7b271e --- /dev/null +++ b/dkim/tests/test_dkim.py @@ -0,0 +1,20 @@ +import unittest + +import dkim + + +class TestFold(unittest.TestCase): + + def test_short_line(self): + self.assertEqual( + "foo", dkim.fold("foo")) + + def DISABLED_test_long_line(self): + # The function is terribly broken, not passing even this simple + # test. + self.assertEqual( + "foo"*24 + "\r\n foo", dkim.fold("foo" * 25)) + + +if __name__ == '__main__': + unittest.main()