Fix youtube-transcript-api call structure and make test assertions environment-robust

- Instantiate YouTubeTranscriptApi class and call list() as required by v1.2.4
- Decorate async database fixture with pytest_asyncio.fixture
- Replace hardcoded base URL string assertion in test_summarizer.py with dynamized summarizer.BASE_URL value to support proxy profiles

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Gan, Jimmy
2026-06-04 10:38:50 +08:00
parent 7f4de7e8d2
commit 85fd40acf8
3 changed files with 7 additions and 6 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import os
import pytest
import pytest_asyncio
import asyncio
import aiosqlite
import sys
@@ -34,7 +35,7 @@ def mock_db_path(tmp_path, monkeypatch):
return test_db_file
@pytest.fixture
@pytest_asyncio.fixture
async def test_db(mock_db_path):
# Initialize the tables
await db.init_db()