# 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 unittest import mock
import cumtest
import os
        chapter = self.create_mock_chapter(**CHAPTER)
        series.chapters.append(chapter)
        series.follow()

        path = os.path.join(self.directory.name, FILENAME)
        result = self.invoke('download')
        self.assertEqual(result.exit_code, 0)
        self.assertIn(MESSAGE, result.output)
        self.assertTrue(os.path.isfile(path))

    def test_download_invalid_login(self):
        CHAPTER = {'url': 'https://manga.madokami.al/Manga/Oneshots/100%20'
                          'Dollar%20wa%20Yasu%20Sugiru/100%24%20is%20Too%20'
                          'Cheap%20%5BYAMAMOTO%20Kazune%5D%20-%20000%20%5B'
                          'Oneshot%5D%20%5BPeebs%5D.zip',
                   'chapter': '000 [Oneshot]'}
        FOLLOW = {'url': 'https://manga.madokami.al/Manga/Oneshots/100%20'
                         'Dollar%20wa%20Yasu%20Sugiru',
                  'name': '100 Dollar wa Yasu Sugiru',
                  'alias': '100-dollar-wa-yasu-sugiru'}
        MESSAGE = ('Could not download 100-dollar-wa-yasu-sugiru 000 '
                   '[Oneshot]: Madokami login error')

        series = self.create_mock_series(**FOLLOW)
        chapter = self.create_mock_chapter(**CHAPTER)
        series.chapters.append(chapter)
        series.follow()

        config.get().madokami.password = '12345'
        config.get().madokami.username = 'KoalaBeer'

# 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_cli_download.py
from cum import config
from unittest import mock
import cumtest
import os

        chapter = self.create_mock_chapter(**CHAPTER)
        series.chapters.append(chapter)
        series.follow()

        path = os.path.join(self.directory.name, FILENAME)
        result = self.invoke('download')
        self.assertEqual(result.exit_code, 0)
        self.assertIn(MESSAGE, result.output)
        self.assertTrue(os.path.isfile(path))

    def test_download_invalid_login(self):
        CHAPTER = {'url': 'https://manga.madokami.al/Manga/Oneshots/100%20'
                          'Dollar%20wa%20Yasu%20Sugiru/100%24%20is%20Too%20'
                          'Cheap%20%5BYAMAMOTO%20Kazune%5D%20-%20000%20%5B'
                          'Oneshot%5D%20%5BPeebs%5D.zip',
                   'chapter': '000 [Oneshot]'}
        FOLLOW = {'url': 'https://manga.madokami.al/Manga/Oneshots/100%20'
                         'Dollar%20wa%20Yasu%20Sugiru',
                  'name': '100 Dollar wa Yasu Sugiru',
                  'alias': '100-dollar-wa-yasu-sugiru'}
        MESSAGE = ('Could not download 100-dollar-wa-yasu-sugiru 000 '
                   '[Oneshot]: Madokami login error')

        series = self.create_mock_series(**FOLLOW)
        chapter = self.create_mock_chapter(**CHAPTER)
        series.chapters.append(chapter)
        series.follow()

        config.get().madokami.password = '12345'
        config.get().madokami.username = 'KoalaBeer'

        config.get().write()