# Path: cum/config.py
# class BaseConfig(object):
# class MadokamiConfig(object):
#     def __init__(self):
#     def __setattr__(self, name, value):
#     def default_download_directory(self):
#     def load(self):
#     def serialize(self):
#     def write(self):
#     def __init__(self, config, dict):
#     def login(self):
# def get():
# def initialize(directory=None):


from cum import config
from cumtest import CumTest
        from cum.scrapers import dynastyscans
import os
import tempfile
import unittest
import zipfile
        path = os.path.join(
            self.directory.name,
            'A Doujin Where Shikinami Became the Secretary Ship',
            'A Doujin Where Shikinami Became the Secretary Ship - c000 '
            '[ More A Doujin Where Shikinami Became the Secretary Ship] '
            '[Anonymous].zip'
        )
        self.assertEqual(chapter.filename, path)
        chapter.download()
        self.assertTrue(os.path.isfile(path))
        with zipfile.ZipFile(path) as chapter_zip:
            files = chapter_zip.infolist()
            self.assertEqual(len(files), 27)

    def test_chapter_no_series(self):
        URL = 'https://dynasty-scans.com/chapters/youre_cute'
        NAME = 'Umekichi'
        CHAPTER = "You're Cute"
        config.get().cbz = True
        chapter = dynastyscans.DynastyScansChapter.from_url(URL)
        self.assertEqual(chapter.alias, NAME.lower())
        self.assertTrue(chapter.available())
        self.assertEqual(chapter.chapter, CHAPTER)
        self.assertIs(chapter.directory, None)
        self.assertEqual(chapter.groups, ['/u/ Scanlations'])
        self.assertEqual(chapter.name, NAME)
        self.assertEqual(chapter.url, URL)
        path = os.path.join(
            self.directory.name, NAME,
            "Umekichi - c000 [You're Cute] [u Scanlations].cbz"

# Path: cum/config.py
# class BaseConfig(object):
# class MadokamiConfig(object):
#     def __init__(self):
#     def __setattr__(self, name, value):
#     def default_download_directory(self):
#     def load(self):
#     def serialize(self):
#     def write(self):
#     def __init__(self, config, dict):
#     def login(self):
# def get():
# def initialize(directory=None):


# Path: tests/test_scraper_dynastyscans.py
from cum import config
from cumtest import CumTest
        from cum.scrapers import dynastyscans
import os
import tempfile
import unittest
import zipfile

        path = os.path.join(
            self.directory.name,
            'A Doujin Where Shikinami Became the Secretary Ship',
            'A Doujin Where Shikinami Became the Secretary Ship - c000 '
            '[ More A Doujin Where Shikinami Became the Secretary Ship] '
            '[Anonymous].zip'
        )
        self.assertEqual(chapter.filename, path)
        chapter.download()
        self.assertTrue(os.path.isfile(path))
        with zipfile.ZipFile(path) as chapter_zip:
            files = chapter_zip.infolist()
            self.assertEqual(len(files), 27)

    def test_chapter_no_series(self):
        URL = 'https://dynasty-scans.com/chapters/youre_cute'
        NAME = 'Umekichi'
        CHAPTER = "You're Cute"
        config.get().cbz = True
        chapter = dynastyscans.DynastyScansChapter.from_url(URL)
        self.assertEqual(chapter.alias, NAME.lower())
        self.assertTrue(chapter.available())
        self.assertEqual(chapter.chapter, CHAPTER)
        self.assertIs(chapter.directory, None)
        self.assertEqual(chapter.groups, ['/u/ Scanlations'])
        self.assertEqual(chapter.name, NAME)
        self.assertEqual(chapter.url, URL)
        path = os.path.join(
            self.directory.name, NAME,
            "Umekichi - c000 [You're Cute] [u Scanlations].cbz"

        )