def test_ansible_not_installed_fails(monkeypatch):
    logger = logging.getLogger(__name__)
    logger.info("Start")
    monkeypatch.setattr(subprocess, "Popen", PopenMockFailRC)
    with pytest.raises(ImportError):
        TasksScheduler.check_ansible_version()
    logger.info("End")
def test_newer_ansible_version_pass(monkeypatch):
    logger = logging.getLogger(__name__)
    logger.info("Start")
    monkeypatch.setattr(subprocess, "Popen", PopenMockPass)
    TasksScheduler.check_ansible_version()
    logger.info("End")