# 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: cum/exceptions.py
# class CumException(Exception):
# class LoginError(CumException):
# class ScrapingError(CumException):
# class ConfigError(CumException):
#     def __init__(self, message=''):
#     def __str__(self):
#     def __init__(self, config, cursor, message=''):


from cum import config
from cum import exceptions
import cumtest
        self.assertEqual(result.exit_code, 1)
        for message in MESSAGES:
            self.assertIn(message, result.output)

    @cumtest.skipIfNoMadokamiLogin
    def test_config_get(self):
        MESSAGES = ['download_directory = ' + config.get().download_directory,
                    'madokami.password = ' + config.get().madokami.password,
                    'madokami.username = ' + config.get().madokami.username]

        result = self.invoke('config', 'get')
        self.assertEqual(result.exit_code, 0)
        for message in MESSAGES:
            self.assertIn(message, result.output)

    def test_config_get_download_directory(self):
        MESSAGE = 'download_directory = ' + config.get().download_directory

        result = self.invoke('config', 'get', 'download_directory')
        self.assertEqual(result.exit_code, 0)
        self.assertIn(MESSAGE, result.output)

    def test_config_get_invalid_value(self):
        MESSAGE = 'Setting not found'

        result = self.invoke('config', 'get', 'wrongkey')
        self.assertEqual(result.exit_code, 1)
        self.assertIn(MESSAGE, result.output)

    def test_config_invalid_mode(self):

# 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: cum/exceptions.py
# class CumException(Exception):
# class LoginError(CumException):
# class ScrapingError(CumException):
# class ConfigError(CumException):
#     def __init__(self, message=''):
#     def __str__(self):
#     def __init__(self, config, cursor, message=''):


# Path: tests/test_cli_config.py
from cum import config
from cum import exceptions
import cumtest

        self.assertEqual(result.exit_code, 1)
        for message in MESSAGES:
            self.assertIn(message, result.output)

    @cumtest.skipIfNoMadokamiLogin
    def test_config_get(self):
        MESSAGES = ['download_directory = ' + config.get().download_directory,
                    'madokami.password = ' + config.get().madokami.password,
                    'madokami.username = ' + config.get().madokami.username]

        result = self.invoke('config', 'get')
        self.assertEqual(result.exit_code, 0)
        for message in MESSAGES:
            self.assertIn(message, result.output)

    def test_config_get_download_directory(self):
        MESSAGE = 'download_directory = ' + config.get().download_directory

        result = self.invoke('config', 'get', 'download_directory')
        self.assertEqual(result.exit_code, 0)
        self.assertIn(MESSAGE, result.output)

    def test_config_get_invalid_value(self):
        MESSAGE = 'Setting not found'

        result = self.invoke('config', 'get', 'wrongkey')
        self.assertEqual(result.exit_code, 1)
        self.assertIn(MESSAGE, result.output)

    def test_config_invalid_mode(self):

        MESSAGE = 'Mode must be either get or set'