# Path: simiki/utils.py
# COLOR_CODES = {
#     "reset": "\033[0m",
#     "black": "\033[1;30m",
#     "red": "\033[1;31m",
#     "green": "\033[1;32m",
#     "yellow": "\033[1;33m",
#     "blue": "\033[1;34m",
#     "magenta": "\033[1;35m",
#     "cyan": "\033[1;36m",
#     "white": "\033[1;37m",
#     "bgred": "\033[1;41m",
#     "bggrey": "\033[1;100m",
# }
# def color_msg(color, msg):
# def check_extension(filename):
# def copytree(src, dst, symlinks=False, ignore=None):
# def emptytree(directory, exclude_list=None):
# def mkdir_p(path):
# def listdir_nohidden(path):
# def write_file(filename, content):
# def get_md5(filename):
# def get_dir_md5(dirname):
# def import_string(import_name, silent=False):
# 
# Path: simiki/updater.py
# def get_input(text):
# def _update_file(filename, local_path, original_path):
# def _update_dir(dirname, local_dir, original_dir, tag='directory'):
# def update_builtin(**kwargs):
# 
# Path: simiki/config.py
# def get_default_config():
#     return _post_process(_set_default_config())


import os
import os.path
import shutil
import unittest
    from unittest.mock import patch
    from mock import patch
from simiki import utils, updater
from simiki.config import get_default_config
        local_fn_md5 = utils.get_md5(self.local_fabfile)
        self.assertEqual(original_fn_md5, local_fn_md5)

        original_fn_md5 = utils.get_dir_md5(self.original_theme)
        local_fn_md5 = utils.get_dir_md5(self.local_theme)
        self.assertEqual(original_fn_md5, local_fn_md5)

    @patch('simiki.updater.get_input', return_value='no')
    def test_update_builtin_exists_with_no(self, mock_input):
        # empty fabfile.py
        with open(self.local_fabfile, 'wb') as _fd:
            _fd.close()
        original_fn_md5 = utils.get_md5(self.original_fabfile)
        local_fn_md5 = utils.get_md5(self.local_fabfile)
        self.assertNotEqual(original_fn_md5, local_fn_md5)

        utils.copytree(self.original_theme, self.local_theme)
        with open(self.local_theme_afile, 'wb') as _fd:
            _fd.close()
        original_fn_md5 = utils.get_dir_md5(self.original_theme)
        local_fn_md5 = utils.get_dir_md5(self.local_theme)
        self.assertNotEqual(original_fn_md5, local_fn_md5)

        updater.update_builtin(**self.kwargs)

        original_fn_md5 = utils.get_md5(self.original_fabfile)
        local_fn_md5 = utils.get_md5(self.local_fabfile)
        self.assertNotEqual(original_fn_md5, local_fn_md5)

        original_fn_md5 = utils.get_dir_md5(self.original_theme)

# Path: simiki/utils.py
# COLOR_CODES = {
#     "reset": "\033[0m",
#     "black": "\033[1;30m",
#     "red": "\033[1;31m",
#     "green": "\033[1;32m",
#     "yellow": "\033[1;33m",
#     "blue": "\033[1;34m",
#     "magenta": "\033[1;35m",
#     "cyan": "\033[1;36m",
#     "white": "\033[1;37m",
#     "bgred": "\033[1;41m",
#     "bggrey": "\033[1;100m",
# }
# def color_msg(color, msg):
# def check_extension(filename):
# def copytree(src, dst, symlinks=False, ignore=None):
# def emptytree(directory, exclude_list=None):
# def mkdir_p(path):
# def listdir_nohidden(path):
# def write_file(filename, content):
# def get_md5(filename):
# def get_dir_md5(dirname):
# def import_string(import_name, silent=False):
# 
# Path: simiki/updater.py
# def get_input(text):
# def _update_file(filename, local_path, original_path):
# def _update_dir(dirname, local_dir, original_dir, tag='directory'):
# def update_builtin(**kwargs):
# 
# Path: simiki/config.py
# def get_default_config():
#     return _post_process(_set_default_config())


# Path: tests/test_updater.py
import os
import os.path
import shutil
import unittest
    from unittest.mock import patch
    from mock import patch
from simiki import utils, updater
from simiki.config import get_default_config

        local_fn_md5 = utils.get_md5(self.local_fabfile)
        self.assertEqual(original_fn_md5, local_fn_md5)

        original_fn_md5 = utils.get_dir_md5(self.original_theme)
        local_fn_md5 = utils.get_dir_md5(self.local_theme)
        self.assertEqual(original_fn_md5, local_fn_md5)

    @patch('simiki.updater.get_input', return_value='no')
    def test_update_builtin_exists_with_no(self, mock_input):
        # empty fabfile.py
        with open(self.local_fabfile, 'wb') as _fd:
            _fd.close()
        original_fn_md5 = utils.get_md5(self.original_fabfile)
        local_fn_md5 = utils.get_md5(self.local_fabfile)
        self.assertNotEqual(original_fn_md5, local_fn_md5)

        utils.copytree(self.original_theme, self.local_theme)
        with open(self.local_theme_afile, 'wb') as _fd:
            _fd.close()
        original_fn_md5 = utils.get_dir_md5(self.original_theme)
        local_fn_md5 = utils.get_dir_md5(self.local_theme)
        self.assertNotEqual(original_fn_md5, local_fn_md5)

        updater.update_builtin(**self.kwargs)

        original_fn_md5 = utils.get_md5(self.original_fabfile)
        local_fn_md5 = utils.get_md5(self.local_fabfile)
        self.assertNotEqual(original_fn_md5, local_fn_md5)

        original_fn_md5 = utils.get_dir_md5(self.original_theme)

        local_fn_md5 = utils.get_dir_md5(self.local_theme)