Rename main.py to discord_rss_bot.py
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from discord_rss_bot.main import app, app_dir
|
from discord_rss_bot.discord_rss_bot import app, app_dir
|
||||||
from typer.testing import CliRunner
|
from typer.testing import CliRunner
|
||||||
|
|
||||||
runner = CliRunner()
|
runner = CliRunner()
|
||||||
@ -36,9 +36,7 @@ def test_backup():
|
|||||||
|
|
||||||
|
|
||||||
def test_add():
|
def test_add():
|
||||||
result = runner.invoke(
|
result = runner.invoke(app, "add https://www.reddit.com/r/Games/new/.rss --no-notify-discord")
|
||||||
app, "add https://www.reddit.com/r/Games/new/.rss --no-notify-discord"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Check if the exit code is 0 and if the output contains the word "added" or "already"
|
# Check if the exit code is 0 and if the output contains the word "added" or "already"
|
||||||
assert result.exit_code == 0
|
assert result.exit_code == 0
|
||||||
@ -55,9 +53,7 @@ def test_delete():
|
|||||||
|
|
||||||
|
|
||||||
def test_add_webhook():
|
def test_add_webhook():
|
||||||
result = runner.invoke(
|
result = runner.invoke(app, "webhook-add https://discordapp.com/api/webhooks/123456789")
|
||||||
app, "webhook-add https://discordapp.com/api/webhooks/123456789"
|
|
||||||
)
|
|
||||||
assert result.exit_code == 0
|
assert result.exit_code == 0
|
||||||
assert "Webhook set to " in result.stdout
|
assert "Webhook set to " in result.stdout
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user