def _setup_app_config(self, **kwargs): self.app_name = kwargs.get('app') self.app_config = kwargs.get('app_config') from amplify.agent.util import configreader if self.app_config is None: self.app_config = configreader.read('app', config_file=kwargs.get('config_file')) else: configreader.CONFIG_CACHE['app'] = self.app_config if kwargs.get('pid_file'): self.app_config['daemon']['pid'] = kwargs.get('pid_file')
def test_read_app_config(self): conf = configreader.read('app') assert_that(conf, instance_of(object)) assert_that(conf.config, has_key('daemon')) assert_that(conf.config, has_key('credentials'))