コード例 #1
0
ファイル: base.py プロジェクト: BioSoundSystems/fabmagic
    def setUp(self):
        self.logger = logger
        self.current_dir = current_dir
        self.fabfile_path = fabfile_path
        self.locading_result = loading_result
        self.env_copy = env_copy
        self.env = env
        self.config_file = _rel(os.path.dirname(__file__), ".config")
        self.new_config_file = _rel(os.path.dirname(__file__), ".new_config")

        config_file = open(self.config_file, 'r')
        config = load(config_file.read(), Loader=Loader)
        config_file.close()
        self.configs_dict = config
        self.env = env
        self.cookbooks_library_dir = self.rel(self.current_dir, COOKBOOKS_LIBRARY_NAME)
        self.cookbooks_roles_dir = self.rel(self.current_dir, COOKBOOKS_LIBRARY_NAME, ROLES_NAME)
        self.cookbooks_dir = self.rel(self.current_dir, COOKBOOKS_LIBRARY_NAME, COOKBOOKS_NAME)
コード例 #2
0
ファイル: base.py プロジェクト: Lispython/fabmagic
    def setUp(self):
        self.logger = logger
        self.current_dir = current_dir
        self.fabfile_path = fabfile_path
        self.locading_result = loading_result
        self.env_copy = env_copy
        self.env = env
        self.config_file = _rel(os.path.dirname(__file__), ".config")
        self.new_config_file = _rel(os.path.dirname(__file__), ".new_config")

        config_file = open(self.config_file, 'r')
        config = load(config_file.read(), Loader=Loader)
        config_file.close()
        self.configs_dict = config
        self.env = env
        self.cookbooks_library_dir = self.rel(self.current_dir,
                                              COOKBOOKS_LIBRARY_NAME)
        self.cookbooks_roles_dir = self.rel(self.current_dir,
                                            COOKBOOKS_LIBRARY_NAME, ROLES_NAME)
        self.cookbooks_dir = self.rel(self.current_dir, COOKBOOKS_LIBRARY_NAME,
                                      COOKBOOKS_NAME)
コード例 #3
0
ファイル: base.py プロジェクト: Lispython/fabmagic
except ImportError:
    from yaml import Loader, Dumper

from fabric.state import env
from fabric.main import load_fabfile

from fabmagic.utils import _rel
from fabmagic.constants import COOKBOOKS_NAME, COOKBOOKS_LIBRARY_NAME, ROLES_NAME

__all__ = 'BaseTestCase',

logger = logging.getLogger("fabmagic.test")

env_copy = deepcopy(env)
current_dir = os.path.dirname(__file__)
fabfile_path = _rel(current_dir, "fabfile.py")
env.real_fabfile = fabfile_path
loading_result = load_fabfile(fabfile_path)


class BaseTestCase(unittest.TestCase):
    """Base test case
    """
    def setUp(self):
        self.logger = logger
        self.current_dir = current_dir
        self.fabfile_path = fabfile_path
        self.locading_result = loading_result
        self.env_copy = env_copy
        self.env = env
        self.config_file = _rel(os.path.dirname(__file__), ".config")
コード例 #4
0
ファイル: base.py プロジェクト: BioSoundSystems/fabmagic

from fabric.state import env
from fabric.main import load_fabfile

from fabmagic.utils import _rel
from fabmagic.constants import COOKBOOKS_NAME, COOKBOOKS_LIBRARY_NAME, ROLES_NAME

__all__ = 'BaseTestCase',

logger = logging.getLogger("fabmagic.test")


env_copy = deepcopy(env)
current_dir = os.path.dirname(__file__)
fabfile_path = _rel(current_dir, "fabfile.py")
env.real_fabfile = fabfile_path
loading_result = load_fabfile(fabfile_path)

class BaseTestCase(unittest.TestCase):
    """Base test case
    """
    def setUp(self):
        self.logger = logger
        self.current_dir = current_dir
        self.fabfile_path = fabfile_path
        self.locading_result = loading_result
        self.env_copy = env_copy
        self.env = env
        self.config_file = _rel(os.path.dirname(__file__), ".config")
        self.new_config_file = _rel(os.path.dirname(__file__), ".new_config")