Repos / pytaku / 29d943bd1f
commit 29d943bd1f3f602dbfe4766e1a7db2ba6475ef01
Author: Bùi Thành Nhân <hi@imnhan.com>
Date:   Fri Sep 3 09:55:56 2021 +0700

    fix mangasee tests

diff --git a/tests/mangoapi/test_mangasee.py b/tests/mangoapi/test_mangasee.py
index fb943ec..914a2b6 100644
--- a/tests/mangoapi/test_mangasee.py
+++ b/tests/mangoapi/test_mangasee.py
@@ -13,11 +13,14 @@ def test_get_title():
         "descriptions": [
             "Yusuke Urameshi was a tough teen delinquent until one selfless act changed his life... by ending it. When he died saving a little kid from a speeding car, the afterlife didn't know what to do with him, so it gave him a second chance at life. Now, Yusuke is a ghost with a mission, performing good deeds at the behest of Botan, the ferrywoman of the River Styx, and Koenma, the pacifier-sucking judge of the dead."
         ],
+        "descriptions_format": "text",
+        "is_webtoon": False,
     }
     assert len(chapters) == 176
     assert chapters[112] == {
         "groups": [],
-        "id": "63.5",
+        "id": "100635",
+        "raw_id": "100635",
         "name": "",
         "num_major": 63,
         "num_minor": 5,
@@ -27,13 +30,13 @@ def test_get_title():
 
 
 def test_get_chapter():
-    chapter = Mangasee().get_chapter("Yu-Yu-Hakusho", "63.5")
+    chapter = Mangasee().get_chapter("Yu-Yu-Hakusho", "100635")
     pages = chapter.pop("pages")
     pages_alt = chapter.pop("pages_alt")
     assert chapter == {
         "groups": [],
-        "id": "63.5",
-        "is_webtoon": False,
+        "id": "100635",
+        "raw_id": "100635",
         "name": "",
         "num_major": 63,
         "num_minor": 5,
@@ -41,8 +44,8 @@ def test_get_chapter():
         "site": "mangasee",
         "title_id": "Yu-Yu-Hakusho",
     }
-    assert pages[0] == "https://s1.mangabeast01.com/manga/Yu-Yu-Hakusho/0063.5-001.png"
-    assert pages[-1] == "https://s1.mangabeast01.com/manga/Yu-Yu-Hakusho/0063.5-031.png"
+    assert pages[0].endswith("/manga/Yu-Yu-Hakusho/0063.5-001.png")
+    assert pages[-1].endswith("/manga/Yu-Yu-Hakusho/0063.5-031.png")
     assert pages_alt == []
 
 
@@ -60,7 +63,7 @@ def set(self, key, val):
     assert results == [
         {
             "id": "Sayonara-Football",
-            "name": "Sayonara Football",
+            "name": "Sayonara, Football",
             "site": "mangasee",
             "thumbnail": "https://cover.nep.li/cover/Sayonara-Football.jpg",
         }