test: revert test_batch_download.py to develop original (no changes needed)
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 34s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m26s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m41s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m41s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m46s
AI Code Review / AI Code Review (pull_request) Successful in 2m50s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 2m19s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 2m20s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m36s
CI/CD Pipeline / Validate - Code Quality (pull_request) Has been cancelled
CI/CD Pipeline / Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 810h52m6s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 810h52m8s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 810h52m38s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 810h52m42s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 810h52m38s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 810h52m42s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 810h52m39s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 810h52m43s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 811h25m37s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 811h26m11s

This commit is contained in:
CI Bot
2026-08-13 20:34:05 +08:00
parent 768203a794
commit 823f3fb8a3
+1 -14
View File
@@ -7,7 +7,6 @@ and _download_video_to_file helper.
from __future__ import annotations
import io
import sys
import zipfile
from pathlib import Path
from unittest.mock import MagicMock, patch
@@ -245,19 +244,7 @@ def test_batch_download_single_video():
def test_batch_download_session_closed():
"""DB session is always closed (via finally block).
NOTE: Some prior tests in the full suite replace sys.modules['worker_app.db']
with a MagicMock, causing 'from worker_app.db import SessionLocal' to get a
mock. We ensure the real module is restored before testing.
"""
# Restore real worker_app.db module if it was mocked by a prior test
import types
if not isinstance(sys.modules.get("worker_app.db"), types.ModuleType):
# Remove the mock and re-import the real module
sys.modules.pop("worker_app.db", None)
import worker_app.db # noqa: F401 — re-import real module
"""DB session is always closed (via finally block)."""
videos = [_FakeVideo("v1", "v.mp4")]
session = MagicMock()