← Về thư mục
tests/test_error_envelope.py
- _Hub · class · L31-L36 — class _Hub
- emitter · method · L32-L33 — def emitter(self, root_frame_id)
- broadcast · method · L35-L36 — def broadcast(self, root_frame_id, event)
- _Recorder · class · L39-L70 — class _Recorder
- init · method · L52-L63 — def init(self, tmp_path, correlation_id="req-1")
- _capture · method · L65-L66 — def _capture(self, code, body, ctype, extra=None)
- json · method · L68-L70 — def json(self, obj, code=200)
- recorder · function · L74-L75 — def recorder(tmp_path)
- test_each_status_maps_to_a_stable_code · function · L98-L99 — def test_each_status_maps_to_a_stable_code(status, expected)
- test_an_unmapped_server_status_is_still_an_internal_error · function · L102-L106 — def test_an_unmapped_server_status_is_still_an_internal_error()
- test_an_error_gains_a_code_status_and_request_id · function · L114-L118 — def test_an_error_gains_a_code_status_and_request_id(recorder)
- test_the_human_message_is_preserved · function · L121-L124 — def test_the_human_message_is_preserved(recorder)
- test_an_explicit_code_wins_over_the_status_default · function · L127-L131 — def test_an_explicit_code_wins_over_the_status_default(recorder)
- test_extra_diagnostic_fields_survive · function · L134-L136 — def test_extra_diagnostic_fields_survive(recorder)
- test_success_responses_are_untouched · function · L139-L145 — def test_success_responses_are_untouched(recorder)
- test_a_2xx_body_that_happens_to_contain_error_is_not_rewritten · function · L148-L153 — def test_a_2xx_body_that_happens_to_contain_error_is_not_rewritten(recorder)
- test_a_non_dict_error_body_is_left_alone · function · L156-L157 — def test_a_non_dict_error_body_is_left_alone(recorder)
- test_a_missing_correlation_id_is_null_not_empty · function · L160-L164 — def test_a_missing_correlation_id_is_null_not_empty(tmp_path)
- test_gateway_error_carries_an_optional_code · function · L172-L178 — def test_gateway_error_carries_an_optional_code()
- test_gateway_error_without_a_code_falls_back_to_the_status_default · function · L181-L184 — def test_gateway_error_without_a_code_falls_back_to_the_status_default()
- test_the_four_distinct_400s_have_distinct_codes · function · L187-L200 — def test_the_four_distinct_400s_have_distinct_codes()
- test_the_envelope_never_destroys_a_field_the_route_set · function · L203-L216 — def test_the_envelope_never_destroys_a_field_the_route_set(recorder)
- test_a_route_that_sets_no_status_still_gets_the_http_one · function · L219-L221 — def test_a_route_that_sets_no_status_still_gets_the_http_one(recorder)
- test_the_envelope_is_json_serialisable · function · L224-L226 — def test_the_envelope_is_json_serialisable(recorder)
- test_the_dispatcher_itself_enriches_not_a_copy_of_it · function · L229-L247 — def test_the_dispatcher_itself_enriches_not_a_copy_of_it(recorder, monkeypatch)
- test_the_decision_route_answers_a_refusal_with_its_mapped_status · function · L250-L313 — def test_the_decision_route_answers_a_refusal_with_its_mapped_status(tmp_path)
- _Broker · class · L288-L290 — class _Broker
- resolve_result · method · L289-L290 — def resolve_result(self, a, *k)
- test_create_session_without_project_id_is_a_400_not_a_missing_project · function · L316-L374 — def test_create_session_without_project_id_is_a_400_not_a_missing_project(tmp_path)
- post_frames · function · L333-L354 — def post_frames(payload: bytes) -> tuple[int, dict]
- test_create_session_docs_row_requires_project_id · function · L377-L388 — def test_create_session_docs_row_requires_project_id()
- test_client_disconnect_is_not_logged_as_a_server_traceback · function · L394-L408 — def test_client_disconnect_is_not_logged_as_a_server_traceback(error, capfd)
- test_a_real_handler_crash_still_gets_the_stdlib_traceback · function · L411-L418 — def test_a_real_handler_crash_still_gets_the_stdlib_traceback(capfd)