Update django/aiservice/core/shared/testgen_review/repair.py

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
This commit is contained in:
Kevin Turcios 2026-03-05 17:09:17 -05:00 committed by GitHub
parent 8106d53e32
commit 737a270801
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -126,6 +126,21 @@ async def testgen_repair(
)
python_version = validate_request_data(testgen_data)
instrumented_behavior, instrumented_perf = instrument_tests(repaired_code, testgen_data, python_version)
if instrumented_behavior is None or instrumented_perf is None:
return 500, TestRepairErrorSchema(error="Failed to instrument repaired tests")
await asyncio.to_thread(ph, request.user, "aiservice-testgen-repair-completed")
return 200, TestRepairResponseSchema(
generated_tests=repaired_code,
instrumented_behavior_tests=instrumented_behavior,
instrumented_perf_tests=instrumented_perf,
)
except HttpError:
raise
except Exception as e:
processed_cst, display_cst = postprocessing_testgen_pipeline(
merged_cst,