-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
56 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
ruff | ||
black | ||
pre-commit | ||
pytest | ||
pytest | ||
pytest-asyncio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
import pytest | ||
from module.rss.engine import RSSEngine | ||
|
||
from .test_database import engine as e | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_rss_engine(): | ||
with RSSEngine(e) as engine: | ||
rss_link = "https://mikanani.me/RSS/Bangumi?bangumiId=2353&subgroupid=552" | ||
|
||
await engine.add_rss(rss_link, aggregate=False) | ||
resp = await engine.add_rss(rss_link, aggregate=False) | ||
assert resp.status | ||
|
||
result = engine.rss.search_active() | ||
assert result[1].name == "Mikan Project - 无职转生~到了异世界就拿出真本事~" | ||
assert result[0].name == "Mikan Project - 无职转生~到了异世界就拿出真本事~" | ||
|
||
new_torrents = engine.pull_rss(result[1]) | ||
new_torrents = await engine.pull_rss(result[1]) | ||
torrent = new_torrents[0] | ||
assert torrent.name == "[Lilith-Raws] 无职转生,到了异世界就拿出真本事 / Mushoku Tensei - 11 [Baha][WEB-DL][1080p][AVC AAC][CHT][MP4]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters