# 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
        series.follow()

    def test_new(self):
        MESSAGES = ['nijipuri', '1  2  3  4  5  6']

        self.create_test_data()

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

    def test_new_empty(self):
        result = self.invoke('new')
        self.assertEqual(result.exit_code, 0)
        self.assertFalse(result.output)

    def test_new_compact(self):
        MESSAGE = 'nijipuri 1  2  3  4  5  6'

        config.get().compact_new = True
        config.get().write()
        self.create_test_data()

        result = self.invoke('new')
        self.assertEqual(result.exit_code, 0)
        self.assertIn(MESSAGE, result.output)

    def test_new_compact_empty(self):
        config.get().compact_new = True

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

        series.follow()

    def test_new(self):
        MESSAGES = ['nijipuri', '1  2  3  4  5  6']

        self.create_test_data()

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

    def test_new_empty(self):
        result = self.invoke('new')
        self.assertEqual(result.exit_code, 0)
        self.assertFalse(result.output)

    def test_new_compact(self):
        MESSAGE = 'nijipuri 1  2  3  4  5  6'

        config.get().compact_new = True
        config.get().write()
        self.create_test_data()

        result = self.invoke('new')
        self.assertEqual(result.exit_code, 0)
        self.assertIn(MESSAGE, result.output)

    def test_new_compact_empty(self):
        config.get().compact_new = True

        config.get().write()