def test_register_scaffold(self): parser = mock.Mock() subparsers = mock.Mock() subparsers.add_parser.return_value = parser command = ScaffoldCommand() command.register(subparsers) scaffold_call = (('scaffold', ), {'nargs': '?', 'help': mock.ANY}) self.assertIn(scaffold_call, parser.add_argument.call_args_list)
def test_register_scaffold(self): parser = mock.Mock() subparsers = mock.Mock() subparsers.add_parser.return_value = parser command = ScaffoldCommand() command.register(subparsers) scaffold_call = (('scaffold',), {'nargs': '?', 'help': mock.ANY}) self.assertIn(scaffold_call, parser.add_argument.call_args_list)
def test_complete_scaffold(self, make, finish): args = mock.Mock(scaffold='default', site='site') command = ScaffoldCommand() command.run(args) make.assert_called_once_with('default', 'site')
def test_lists_scaffolds(self, list_scaffolds): args = mock.Mock(scaffold=None) command = ScaffoldCommand() command.run(args) self.assertTrue(list_scaffolds.called)
# Copyright (c) 2017, Matt Layman from handroll.commands.build import BuildCommand from handroll.commands.scaffold import ScaffoldCommand from handroll.commands.watch import WatchCommand COMMANDS = [ BuildCommand(), WatchCommand(), ScaffoldCommand(), ]