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