# Path: test/stub_environment.py
# class StubEnvironment(object):
#     def __init__(self):
#         self.cwd = None
#         self.tree = None
#         self.argument = None
# 
# Path: googkit/commands/init.py
# class InitCommand(Command):
#     def copy_template(self, dst_dir):
#         """Copy template files (include default googkit.cfg, demonstration files) to the specified directory.
#         """
#         template_dir = googkit.lib.path.template()
# 
#         conflicted = set(os.listdir(dst_dir)) & set(os.listdir(template_dir))
#         if conflicted:
#             raise GoogkitError(_('Conflicted files: {files}').format(
#                 files=', '.join(conflicted)))
# 
#         distutils.dir_util.copy_tree(template_dir, dst_dir)
# 
#     def run_internal(self):
#         cwd = self.env.cwd
#         self.copy_template(cwd)
#         logging.info(_('Initialized googkit project in {path}').format(
#             path=cwd))
# 
# Path: googkit/lib/error.py
# class GoogkitError(Exception):
#     """Base class for error in Googkit."""
# 
#     def __init__(self, message):
#         """Creates a local error of googkit by the specified message.
#         """
#         self._message = message
# 
#     @property
#     def message(self):
#         return self._message
# 
#     def __str__(self):
#         return self.message


import unittest
from test.stub_config import *
from test.stub_environment import StubEnvironment
from googkit.commands.init import InitCommand
from googkit.compat.unittest import mock
from googkit.lib.error import GoogkitError




class TestInitCommand(unittest.TestCase):
    def setUp(self):
        self.env = StubEnvironment()
        self.env.config = StubConfig()
        self.cmd = InitCommand(self.env)

    def test_needs_project_config(self):

# Path: test/stub_environment.py
# class StubEnvironment(object):
#     def __init__(self):
#         self.cwd = None
#         self.tree = None
#         self.argument = None
# 
# Path: googkit/commands/init.py
# class InitCommand(Command):
#     def copy_template(self, dst_dir):
#         """Copy template files (include default googkit.cfg, demonstration files) to the specified directory.
#         """
#         template_dir = googkit.lib.path.template()
# 
#         conflicted = set(os.listdir(dst_dir)) & set(os.listdir(template_dir))
#         if conflicted:
#             raise GoogkitError(_('Conflicted files: {files}').format(
#                 files=', '.join(conflicted)))
# 
#         distutils.dir_util.copy_tree(template_dir, dst_dir)
# 
#     def run_internal(self):
#         cwd = self.env.cwd
#         self.copy_template(cwd)
#         logging.info(_('Initialized googkit project in {path}').format(
#             path=cwd))
# 
# Path: googkit/lib/error.py
# class GoogkitError(Exception):
#     """Base class for error in Googkit."""
# 
#     def __init__(self, message):
#         """Creates a local error of googkit by the specified message.
#         """
#         self._message = message
# 
#     @property
#     def message(self):
#         return self._message
# 
#     def __str__(self):
#         return self.message


# Path: test/commands/test_init.py
import unittest
from test.stub_config import *
from test.stub_environment import StubEnvironment
from googkit.commands.init import InitCommand
from googkit.compat.unittest import mock
from googkit.lib.error import GoogkitError





class TestInitCommand(unittest.TestCase):
    def setUp(self):
        self.env = StubEnvironment()
        self.env.config = StubConfig()
        self.cmd = InitCommand(self.env)

    def test_needs_project_config(self):

        self.assertFalse(InitCommand.needs_project_config())