comparison test/test_admin.py @ 6957:f924af12ef50

issue2551233 - create new roundup-admin command "templates" add a command to list all templates, the directory where they are defined, and a description. If called as templates trace_dir also list all directores that are search for templates even if none are found.
author John Rouillard <rouilj@ieee.org>
date Mon, 12 Sep 2022 18:29:50 -0400
parents ff4ab763f47c
children e54a2db40a9e
comparison
equal deleted inserted replaced
6956:ca6b056b79a4 6957:f924af12ef50
1248 out = out.getvalue().strip() 1248 out = out.getvalue().strip()
1249 print(out) 1249 print(out)
1250 print(expected) 1250 print(expected)
1251 self.assertEqual(out, expected) 1251 self.assertEqual(out, expected)
1252 1252
1253 def testTemplates(self):
1254
1255 self.install_init()
1256 self.admin=AdminTool()
1257
1258 with captured_output() as (out, err):
1259 # command does not require a tracker home. use zZzZ to cause error
1260 sys.argv=['main', '-i', "zZzZ", 'templates' ]
1261 ret = self.admin.main()
1262
1263 out = out.getvalue().strip()
1264
1265 for tracker in ['Name: classic\nPath:',
1266 'Name: devel\nPath:',
1267 'Name: jinja2\nPath:',
1268 'Name: minimal\nPath:',
1269 'Name: responsive\nPath:']:
1270 self.assertIn(tracker, out)
1253 1271
1254 class anydbmAdminTest(AdminTest, unittest.TestCase): 1272 class anydbmAdminTest(AdminTest, unittest.TestCase):
1255 backend = 'anydbm' 1273 backend = 'anydbm'
1256 1274
1257 1275

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