Esempio n. 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
Esempio n. 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
Esempio n. 3
0
    def test_it_runs_with_no_argument(self, show_help):
        sys.args = []

        runner.run()

        show_help.assert_called_with()
Esempio n. 4
0
    def test_it_runs_with_no_argument(self, show_help):
        sys.args = []

        runner.run()

        show_help.assert_called_with()