def test_ansible_is_not_there(self, monkeypatch): monkeypatch.setattr(hooks, "which", lambda x: None) with pytest.raises(hooks.SystemCheckError): hooks.ansible_exists()
def test_ansible_is_not_there(self, monkeypatch): monkeypatch.setattr(hooks, 'which', lambda x: None) with pytest.raises(hooks.SystemCheckError): hooks.ansible_exists()
def test_ansible_is_there(self, monkeypatch): monkeypatch.setattr(hooks, "which", lambda x: "/usr/bin/ansible-playbook") assert hooks.ansible_exists() is None
def test_ansible_is_there(self, monkeypatch): monkeypatch.setattr(hooks, 'which', lambda x: '/usr/bin/ansible-playbook') assert hooks.ansible_exists() is None