示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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')
示例#4
0
 def test_lists_scaffolds(self, list_scaffolds):
     args = mock.Mock(scaffold=None)
     command = ScaffoldCommand()
     command.run(args)
     self.assertTrue(list_scaffolds.called)
示例#5
0
 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')
示例#6
0
 def test_lists_scaffolds(self, list_scaffolds):
     args = mock.Mock(scaffold=None)
     command = ScaffoldCommand()
     command.run(args)
     self.assertTrue(list_scaffolds.called)
示例#7
0
# 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(),
]