Run add_missing_tags when testing and adding feed
This commit is contained in:
@ -72,6 +72,8 @@ async def add_webhook(webhook_name=Form(), webhook_url=Form()):
|
|||||||
# Add our new list of webhooks to the database.
|
# Add our new list of webhooks to the database.
|
||||||
reader.set_tag((), "webhooks", webhooks) # type: ignore
|
reader.set_tag((), "webhooks", webhooks) # type: ignore
|
||||||
|
|
||||||
|
add_missing_tags(reader)
|
||||||
|
|
||||||
return RedirectResponse(url="/", status_code=303)
|
return RedirectResponse(url="/", status_code=303)
|
||||||
|
|
||||||
# TODO: Show this error on the page.
|
# TODO: Show this error on the page.
|
||||||
|
@ -6,6 +6,7 @@ import pytest
|
|||||||
from reader import Feed, Reader, make_reader # type: ignore
|
from reader import Feed, Reader, make_reader # type: ignore
|
||||||
|
|
||||||
from discord_rss_bot.feeds import send_to_discord
|
from discord_rss_bot.feeds import send_to_discord
|
||||||
|
from discord_rss_bot.missing_tags import add_missing_tags
|
||||||
|
|
||||||
|
|
||||||
def test_send_to_discord() -> None:
|
def test_send_to_discord() -> None:
|
||||||
@ -22,6 +23,8 @@ def test_send_to_discord() -> None:
|
|||||||
# Add a feed to the reader.
|
# Add a feed to the reader.
|
||||||
reader.add_feed("https://www.reddit.com/r/Python/.rss")
|
reader.add_feed("https://www.reddit.com/r/Python/.rss")
|
||||||
|
|
||||||
|
add_missing_tags(reader)
|
||||||
|
|
||||||
# Update the feed to get the entries.
|
# Update the feed to get the entries.
|
||||||
reader.update_feeds()
|
reader.update_feeds()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user