Ejemplo n.º 1
0
    def test_command_raises_IpmiException_handling(self, monkeypatch):
        monkeypatch.setattr(IPMIDataFetcher, "open", lambda self: None)

        with pytest.raises(MKAgentError):
            with IPMIDataFetcher("127.0.0.1", "", "",
                                 logging.getLogger("tests")):
                raise IpmiException()
Ejemplo n.º 2
0
 def open_(*args):
     raise IpmiException()