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
def test_it_runs_with_no_argument(self, show_help): sys.args = [] runner.run() show_help.assert_called_with()