mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-02 01:27:24 -04:00
Fix two failing unit tests by making mock executors properly simulate the job detail status updates that real ModelDayExecutor performs: - test_run_updates_job_status_to_completed - test_run_handles_partial_failure Root cause: Tests mocked ModelDayExecutor but didn't simulate the update_job_detail_status() calls. The implementation relies on these calls to automatically transition job status from pending to completed/partial/failed. Solution: Mock executors now call manager.update_job_detail_status() to properly simulate the status update lifecycle: 1. Update to "running" when execution starts 2. Update to "completed" or "failed" when execution finishes This matches the real ModelDayExecutor behavior and allows the automatic job status transition logic in JobManager to work correctly.