Ejemplo n.º 1
0
 def __init__(self, config_file=None):
     config_file = config_file or Defaults.get_config()
     self.config_data = None
     try:
         with open(config_file, 'r') as config:
             self.config_data = yaml.safe_load(config)
     except Exception as e:
         raise MashConfigException(
             'Failed reading config file: {config}: {error}'.format(
                 config=config_file, error=e
             )
         )
Ejemplo n.º 2
0
def test_get_config():
    config = Defaults.get_config()
    assert config == '/etc/mash/mash_config.yaml'