Add default embed settings when creating the feed

This commit is contained in:
Joakim Hellsén 2026-03-18 05:33:37 +01:00
commit 4836c2428b
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk
3 changed files with 39 additions and 11 deletions

View file

@ -4,11 +4,14 @@ import os
import shutil
import sys
import tempfile
import warnings
from contextlib import suppress
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from bs4 import MarkupResemblesLocatorWarning
if TYPE_CHECKING:
import pytest
@ -34,6 +37,11 @@ def pytest_sessionstart(session: pytest.Session) -> None:
os.environ["DISCORD_RSS_BOT_DATA_DIR"] = str(worker_data_dir)
# Tests call markdownify which may invoke BeautifulSoup on strings that look
# like URLs; that triggers MarkupResemblesLocatorWarning from bs4. Silence
# that warning during tests to avoid noisy output.
warnings.filterwarnings("ignore", category=MarkupResemblesLocatorWarning)
# If modules were imported before this hook (unlikely), force them to use
# the worker-specific location.
settings_module: Any = sys.modules.get("discord_rss_bot.settings")