def test_subcommands(self): cfg = mamba_admin.Options() subCommands = cfg.subCommands expectedOrder = [ 'application', 'sql', 'controller', 'model', 'view', 'package', 'start', 'stop' ] for subCommand, expectedCommand in zip(subCommands, expectedOrder): name, shortcut, parserClass, documentation = subCommand self.assertEqual(name, expectedCommand) self.assertEqual(shortcut, None)
def setUp(self): self.config = mamba_admin.Options() self.stdout = sys.stdout self.capture = StringIO() sys.stdout = self.capture