Mercurial > p > roundup > code
diff test/test_init.py @ 4816:9b3e09a50d85
init.loadTemplateInfo: Add test
| author | anatoly techtonik <techtonik@gmail.com> |
|---|---|
| date | Sat, 24 Aug 2013 22:12:19 +0300 |
| parents | |
| children | edb171528a7d |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/test_init.py Sat Aug 24 22:12:19 2013 +0300 @@ -0,0 +1,36 @@ +#-*- encoding: utf8 -*- + +import unittest, os, pprint, difflib, textwrap + +from roundup.init import loadTemplateInfo + + +class TemplateInfoTestCase(unittest.TestCase): + def testLoadTemplateInfo(self): + path = os.path.join(os.path.dirname(__file__), + '../share/roundup/templates/classic') + self.maxDiff = None + self.assertEqual( + loadTemplateInfo(path), + { + 'description': textwrap.dedent('''\ + This is a generic issue tracker that may be used to track bugs, + feature requests, project issues or any number of other types + of issues. Most users of Roundup will find that this template + suits them, with perhaps a few customisations.'''), + 'intended-for': 'All first-time Roundup users', + 'name': 'classic', + 'path': path + } + ) + +def test_suite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TemplateInfoTestCase)) + return suite + +if __name__ == '__main__': + runner = unittest.TextTestRunner() + unittest.main(testRunner=runner) + +# vim: set et sts=4 sw=4 :
