# 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
        self.assertIn(MESSAGE, result.output)
        self.assertTrue(os.path.isfile(path))

    def test_get_chapter_madokami_directory(self):
        URL = ('https://manga.madokami.al/Manga/Oneshots/12-ji%20no%20Kane%20'
               'ga%20Naru/12%20O%27Clock%20Bell%20Rings%20%5BKISHIMOTO%20'
               'Seishi%5D%20-%20000%20%5BOneshot%5D%20%5BTurtle%20Paradise%5D'
               '.zip')
        DIRECTORY = 'oneshots'

        path = os.path.join(
            self.directory.name, DIRECTORY,
            '12-ji no Kane ga Naru - c000 [000 [Oneshot] [Turtle] [Unknown]'
            '.zip'
        )
        result = self.invoke('get', '--directory', DIRECTORY, URL)
        self.assertEqual(result.exit_code, 0)
        self.assertTrue(os.path.isfile(path))

    def test_get_chapter_madokami_invalid_login(self):
        URL = ('https://manga.madokami.al/Manga/Oneshots/12-ji%20no%20Kane%20'
               'ga%20Naru/12%20O%27Clock%20Bell%20Rings%20%5BKISHIMOTO%20'
               'Seishi%5D%20-%20000%20%5BOneshot%5D%20%5BTurtle%20Paradise%5D'
               '.zip')
        MESSAGES = ['Madokami username:',
                    'Madokami password:',
                    'Madokami login error']

        config.get().madokami.username = None
        config.get().madokami.password = None

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

        self.assertIn(MESSAGE, result.output)
        self.assertTrue(os.path.isfile(path))

    def test_get_chapter_madokami_directory(self):
        URL = ('https://manga.madokami.al/Manga/Oneshots/12-ji%20no%20Kane%20'
               'ga%20Naru/12%20O%27Clock%20Bell%20Rings%20%5BKISHIMOTO%20'
               'Seishi%5D%20-%20000%20%5BOneshot%5D%20%5BTurtle%20Paradise%5D'
               '.zip')
        DIRECTORY = 'oneshots'

        path = os.path.join(
            self.directory.name, DIRECTORY,
            '12-ji no Kane ga Naru - c000 [000 [Oneshot] [Turtle] [Unknown]'
            '.zip'
        )
        result = self.invoke('get', '--directory', DIRECTORY, URL)
        self.assertEqual(result.exit_code, 0)
        self.assertTrue(os.path.isfile(path))

    def test_get_chapter_madokami_invalid_login(self):
        URL = ('https://manga.madokami.al/Manga/Oneshots/12-ji%20no%20Kane%20'
               'ga%20Naru/12%20O%27Clock%20Bell%20Rings%20%5BKISHIMOTO%20'
               'Seishi%5D%20-%20000%20%5BOneshot%5D%20%5BTurtle%20Paradise%5D'
               '.zip')
        MESSAGES = ['Madokami username:',
                    'Madokami password:',
                    'Madokami login error']

        config.get().madokami.username = None
        config.get().madokami.password = None

        config.get().write()