refactor(admin): move Needs review recording into its own mixin
_record_scanned_review, _record_review_sync, record_review_file and _log_review_items move unchanged from py/api/admin.py to py/api/review_recording.py (ReviewRecordingMixin), keeping admin.py from growing further past the size ceiling. No behaviour change.
This commit is contained in:
@@ -222,9 +222,9 @@ class TestScanRecording(ReviewTestCase):
|
||||
if recorder is None:
|
||||
counts = api._ingest_scan_batch_sync(batch, roots, outcomes)
|
||||
else:
|
||||
from py.api import admin
|
||||
from py.api import review_recording
|
||||
|
||||
with patch.object(admin, "record_ambiguous_file", recorder):
|
||||
with patch.object(review_recording, "record_ambiguous_file", recorder):
|
||||
counts = api._ingest_scan_batch_sync(batch, roots, outcomes)
|
||||
prompts = api.db.get_recent_prompts()["prompts"]
|
||||
return counts, outcomes, sorted(p["text"] for p in prompts)
|
||||
|
||||
Reference in New Issue
Block a user