Beispiel #1
0
 def _mock_other_lambdas(self, helper: ResponsesHelper, up: bool):
     for lambda_name in self._other_lambda_names():
         helper.add(
             responses.Response(method='GET',
                                url=config.lambda_endpoint(lambda_name) +
                                '/health/basic',
                                status=200 if up else 500,
                                json={'up': up}))
Beispiel #2
0
 def _mock_service_endpoints(self, helper: ResponsesHelper,
                             endpoint_states: Mapping[str, bool]) -> None:
     for endpoint, endpoint_up in endpoint_states.items():
         helper.add(
             responses.Response(method='HEAD',
                                url=config.service_endpoint() + endpoint,
                                status=200 if endpoint_up else 503,
                                json={}))
     yield