Add default embed settings when creating the feed
This commit is contained in:
parent
d51ca2cced
commit
4836c2428b
3 changed files with 39 additions and 11 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue