Exemplo n.º 1
0
 def test_failing_non_blocking_hook(self):
     """Two failing hook, non blocking, all evaluated"""
     runner = hookrunner()
     runner.register(failinghook, blocking=False)
     runner.register(failinghook2)
     assert(runner.evaluate()) == False
     assert(runner.log.read()) == [ERROR_MSG, ERROR_MSG2]
Exemplo n.º 2
0
 def test_failing_stop_hook(self):
     """Two failing hook, second one should not run"""
     runner = hookrunner()
     runner.register(failinghook)
     runner.register(failinghook2)
     assert(runner.evaluate()) == False
     assert(runner.log.read()) == [ERROR_MSG]
Exemplo n.º 3
0
 def test_failing_hook(self):
     """Failing hook fails with error message recorded"""
     runner = hookrunner()
     runner.register(failinghook)
     assert(runner.evaluate()) == False
     assert(runner.log.read()) == [ERROR_MSG]
Exemplo n.º 4
0
 def test_passing_failing_hook(self):
     """Passing than failing hook, fails overall"""
     runner = hookrunner()
     runner.register(passinghook)
     runner.register(failinghook)
     assert(runner.evaluate()) == False
Exemplo n.º 5
0
 def test_passing_hook(self):
     """Passing hook works"""
     runner = hookrunner()
     runner.register(passinghook)
     assert(runner.evaluate()) == True