view test/test_textfmt.py @ 4543:d16d9bf655d8

- fix handling of traceback mails to the roundup admin - now this mail is a multipart/alternative with the HTML part *and* the traceback in text-format.
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Fri, 07 Oct 2011 19:08:54 +0000
parents f35ece8f8ff7
children 364c54991861
line wrap: on
line source

import unittest

from roundup.support import wrap

class WrapTestCase(unittest.TestCase):
    def testWrap(self):
        lorem = '''Lorem ipsum dolor sit amet, consectetuer adipiscing elit.'''
        wrapped = '''Lorem ipsum dolor
sit amet,
consectetuer
adipiscing elit.'''
        self.assertEquals(wrap(lorem, 20), wrapped)

def test_suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(WrapTestCase))
    return suite

Roundup Issue Tracker: http://roundup-tracker.org/