Skip to content

Commit 3a461c2

Browse files
committed
init.loadTemplateInfo: Add test
1 parent e2251c7 commit 3a461c2

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

test/test_init.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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 :

0 commit comments

Comments
 (0)