Files
KomTagger/tests/test_manga.py

56 lines
2.1 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import pytest
from anilistapi.schemas.manga import Manga
testmanga = {
"id": 107134,
"title": {
"romaji": "Nanatsu no Maken ga Shihai Suru",
"english": "Reign of the Seven Spellblades",
"native": "七つの魔剣が支配する",
},
"type": "MANGA",
"format": "MANGA",
"synonyms": ["Seven Magic Swords Rule", "Nanatsuma", "ななつま"],
"status": "FINISHED",
"genres": ["Action", "Fantasy"],
"tags": [
{"name": "Shounen", "isAdult": False},
{"name": "School", "isAdult": False},
{"name": "Magic", "isAdult": False},
{"name": "Swordplay", "isAdult": False},
],
"description": "Its springtime at Kimberly Magic Academy, and that means the arrival of a fresh crop of first-year students. Whether its the quiet and studious Oliver Horn or Nanao Hibiya, a samurai girl from a distant land, they come with wands and swords at their waists, ready to take their first steps on the road to magical mastery. However, beneath its brilliant facade of cherry blossoms, the academy hides countless dangers and dark secrets, ready to take the lives of the unprepared…!\n<br><br>\n(Source: Yen Press) ",
"coverImage": {
"large": "https://s4.anilist.co/file/anilistcdn/media/manga/cover/medium/bx107134-VJ3gvvxKTvec.jpg"
},
"isAdult": False,
"chapters": 46,
"volumes": 8,
"externalLinks": [
{
"site": "ComicWalker",
"url": "https://comic-walker.com/contents/detail/KDCW_KS01201140010000_68/",
"type": "STREAMING",
},
{
"site": "Yen Press",
"url": "https://yenpress.com/series/reign-of-the-seven-spellblades-manga",
"type": "INFO",
},
{
"site": "Web Ace",
"url": "https://web-ace.jp/shonenace/contents/397/",
"type": "STREAMING",
},
],
"countryOfOrigin": "JP",
}
def test_manga():
manga = Manga(**testmanga)
assert manga.id == 107134
assert manga.isManga is True
assert manga.isLightNovel is False