示例#1
0
    def test_it_does_execute_valid_commands(self, ArgsParserBuilder, Cli):
        command = Mock()
        command.valid.return_value = True
        Cli.command.return_value = command

        runner.run()

        assert command.execute.called
示例#2
0
    def test_it_does_execute_valid_commands(self, ArgsParserBuilder, Cli):
        command = Mock()
        command.valid.return_value = True
        Cli.command.return_value = command

        runner.run()

        assert command.execute.called
示例#3
0
    def test_it_runs_with_no_argument(self, show_help):
        sys.args = []

        runner.run()

        show_help.assert_called_with()
示例#4
0
    def test_it_runs_with_no_argument(self, show_help):
        sys.args = []

        runner.run()

        show_help.assert_called_with()