comparison 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
comparison
equal deleted inserted replaced
4815:efa61cc8be67 4816:9b3e09a50d85
1 #-*- encoding: utf8 -*-
2
3 import unittest, os, pprint, difflib, textwrap
4
5 from roundup.init import loadTemplateInfo
6
7
8 class TemplateInfoTestCase(unittest.TestCase):
9 def testLoadTemplateInfo(self):
10 path = os.path.join(os.path.dirname(__file__),
11 '../share/roundup/templates/classic')
12 self.maxDiff = None
13 self.assertEqual(
14 loadTemplateInfo(path),
15 {
16 'description': textwrap.dedent('''\
17 This is a generic issue tracker that may be used to track bugs,
18 feature requests, project issues or any number of other types
19 of issues. Most users of Roundup will find that this template
20 suits them, with perhaps a few customisations.'''),
21 'intended-for': 'All first-time Roundup users',
22 'name': 'classic',
23 'path': path
24 }
25 )
26
27 def test_suite():
28 suite = unittest.TestSuite()
29 suite.addTest(unittest.makeSuite(TemplateInfoTestCase))
30 return suite
31
32 if __name__ == '__main__':
33 runner = unittest.TextTestRunner()
34 unittest.main(testRunner=runner)
35
36 # vim: set et sts=4 sw=4 :

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