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)
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)
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)
# 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(), ]