# pylint: disable=redefined-outer-name,unused-argument import falcon import pytest from falcon import testing pytestmark = [pytest.mark.integration] @pytest.mark.parametrize(('service_response', 'expected_status'), [ (True, falcon.HTTP_204), (False, falcon.HTTP_500), ]) # yapf: disable def test_health_check(client, mocker, service_response, expected_status): mocker.patch( 'dapd_exporter_api.services.health_check.HealthCheckService.is_healthy', return_value=service_response ) result: testing.Result = client.simulate_get('/api/v1/health/') assert result.status == expected_status