示例#1
0
def test_execute(
    mocker, patched_logger_info, patched_config_validate, config_instance,
):
    l = lint.Lint(config_instance)
    l.execute()

    x = [mocker.call("Scenario: 'default'"), mocker.call("Action: 'lint'")]
    assert x in patched_logger_info.mock_calls
示例#2
0
def test_execute(mocker, patched_logger_info, patched_ansible_lint,
                 config_instance):
    l = lint.Lint(config_instance)
    l.execute()
    x = [
        mocker.call('Scenario: [default]'), mocker.call('Lint: [ansible-lint]')
    ]

    assert x == patched_logger_info.mock_calls

    patched_ansible_lint.assert_called_once_with()
示例#3
0
def test_execute(
    mocker,
    patched_logger_info,
    patched_config_validate,
    config_instance,
):
    l = lint.Lint(config_instance)
    l.execute()

    name, args, kwargs = patched_logger_info.mock_calls[0]
    assert "default" in args
    assert "lint" in args
示例#4
0
def test_execute(mocker, patched_logger_info, patched_yamllint, patched_flake8,
                 patched_ansible_lint, config_instance):
    l = lint.Lint(config_instance)
    l.execute()

    x = [
        mocker.call("Scenario: 'default'"),
        mocker.call("Action: 'lint'"),
    ]
    assert x == patched_logger_info.mock_calls

    patched_yamllint.assert_called_once_with()
    patched_flake8.assert_called_once_with()
    patched_ansible_lint.assert_called_once_with()