def test_log_and_mail(): log_fn = lambda s: None log_and_mail(MockMailer(), log_fn, "subject", "msg", exit=False, bypass_limiter=False) with pytest.raises(FatalKrunError): log_and_mail(MockMailer(), log_fn, "", "", exit=True, bypass_limiter=False) assert True
def platform(self): return detect_platform(MockMailer(), Config())
def mock_platform(self): return MockPlatform(MockMailer(), Config())