def test_failing_checks_result_in_503_status(): info = health.HealthInfo([TrivialCheck(result=False)]) assert info.status == 503 assert info.check_results == {'TrivialCheck': False}
def test_disabled_checks_are_ignored(): info = health.HealthInfo([TrivialCheck(is_enabled=False)]) assert info.status == 200 assert info.check_results == {}
def test_extended_checks_work(): info = health.HealthInfo([TrivialExtendedCheck()]) assert info.check_results == {} info = health.HealthInfo([TrivialExtendedCheck()], is_extended=True) assert info.check_results == {'TrivialExtendedCheck': True}