示例#1
0
文件: test_cli.py 项目: corydodt/Noms
 def test_main(self):
     """
     Does main return a resource, suitable for starting up twisted web?
     """
     with mockConfig(cliOptions={'alias': DBAlias.nomsTest}):
         res = cli.main()
         self.assertTrue(hasattr(res, 'render'))
示例#2
0
文件: test_cli.py 项目: corydodt/Noms
 def test_postOptions(self):
     """
     Does postOptions create the config and return options?
     """
     with mockConfig() as cfg:
         opts = cli.NomsOptions()
         opts['hax'] = 'haxor'
         opts.postOptions()
         self.assertEqual(cfg.cliOptions.get('hax'), 'haxor')