Exemple #1
0
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
Exemple #2
0
 def platform(self):
     return detect_platform(MockMailer(), Config())
Exemple #3
0
 def mock_platform(self):
     return MockPlatform(MockMailer(), Config())