Beispiel #1
0
 def test_register_outdir(self):
     parser = mock.Mock()
     subparsers = mock.Mock()
     subparsers.add_parser.return_value = parser
     command = BuildCommand()
     command.register(subparsers)
     outdir_call = (('outdir', ), {'nargs': '?', 'help': mock.ANY})
     self.assertIn(outdir_call, parser.add_argument.call_args_list)
Beispiel #2
0
 def test_register_outdir(self):
     parser = mock.Mock()
     subparsers = mock.Mock()
     subparsers.add_parser.return_value = parser
     command = BuildCommand()
     command.register(subparsers)
     outdir_call = (('outdir',), {'nargs': '?', 'help': mock.ANY})
     self.assertIn(outdir_call, parser.add_argument.call_args_list)
Beispiel #3
0
 def test_complete_build(self, finish):
     site = self.factory.make_site()
     args = mock.Mock(site=site.path, outdir='.')
     command = BuildCommand()
     command.run(args)
     self.assertTrue(finish.called)
Beispiel #4
0
 def test_complete_build(self, finish):
     site = self.factory.make_site()
     args = mock.Mock(site=site.path, outdir='.')
     command = BuildCommand()
     command.run(args)
     self.assertTrue(finish.called)
Beispiel #5
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(),
]