b2bf9af6de
Full-suite runs showed test_batch_download_session_closed and test_batch_download_closes_session_on_error failing with "Expected close to have been called once. Called 0 times." Changes: - Patch SessionLocal in all possible locations: _db_mod, sys.modules, and function globals (if present) - Call raw_fn directly instead of going through _call_task - Add diagnostic assertion to verify mock_session_factory was called - Remove try/finally restore (not needed for isolated tests) Also includes fix from PR #1407: add missing str fields to mock clip.