예제 #1
0
    def __init__(self, mal_id: int, my_mal_id, account):
        """
        """
        from pymal import manga
        if isinstance(mal_id, manga.Manga):
            self.obj = mal_id
        else:
            self.obj = manga.Manga(mal_id)

        self.__my_mal_url = self.__MY_MAL_URL.format(my_mal_id)

        self._is_my_loaded = False
        self._account = account

        self.__my_mal_id = my_mal_id
        self.__my_status = 0
        self.my_enable_discussion = False
        self.__my_score = 0.0
        self.__my_start_date = ''
        self.__my_end_date = ''
        self.__my_priority = 0
        self.__my_storage_type = 0
        self.__my_comments = ''
        self.__my_fan_sub_groups = ''
        self.__my_tags = frozenset()
        self.__my_retail_volumes = 0

        self.__my_is_rereading = None
        self.__my_completed_chapters = None
        self.__my_completed_volumes = None
        self.__my_downloaded_chapters = 0
        self.__my_times_reread = 0
        self.__my_reread_value = None
예제 #2
0
    def test_add_and_delete(self):
        mng = manga.Manga(ADD_MANGA_ID)
        my_mng = mng.add(self.account)

        self.assertIsInstance(my_mng, my_manga.MyManga)
        self.account.mangas.reload()
        self.assertIn(my_mng, self.account.mangas)

        my_mng.delete()
        self.account.mangas.reload()
        self.assertNotIn(my_mng, self.account.mangas)
예제 #3
0
    def _SEARCHED_OBJECT(self, mal_url: str):
        from pymal import manga

        mal_id = int(mal_url.split('/')[0])
        return manga.Manga(int(mal_id))
예제 #4
0
 def setUpClass(cls):
     cls.manga = manga.Manga(MANGA_ID)
     cls.manga.reload()
예제 #5
0
 def test_equal(self):
     mng = manga.Manga(self.manga.id)
     self.assertEqual(mng, self.manga)
예제 #6
0
 def test_contains_manga(self):
     my_manga = list(self.mangas)[0]
     mng = manga.Manga(my_manga.id)
     self.assertIn(mng, self.mangas)