manga-dlp/tests/test_01_app.py
Ivan Schaller b4340a93b8
All checks were successful
ci/woodpecker/push/tests Pipeline was successful
move list processing to input.py
2022-05-20 19:32:36 +02:00

18 lines
544 B
Python

from pathlib import Path
import pytest
import mangadlp.app as app
from mangadlp.api.mangadex import Mangadex
def test_check_api_mangadex():
url = "https://mangadex.org/title/a96676e5-8ae2-425e-b549-7f15dd34a6d8/komi-san-wa-komyushou-desu"
test = app.MangaDLP(url_uuid=url, list_chapters=True)
assert test.api_used == Mangadex
def test_check_api_none():
url = "https://abc.defghjk/title/abc/def"
with pytest.raises(ValueError) as e:
app.MangaDLP(url_uuid=url, list_chapters=True)
assert e.type == ValueError