Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Create default ConfigParser config.

        def make_default_config(repo_path=default_repo_path):
    '''Create default ConfigParser config.'''
    cfg = Config()
    cfg.add_section('dpm')
    cfg.add_section('index:ckan')
    cfg.add_section('index:db')
    cfg.add_section('upload:ckan')
    cfg.set('dpm', 'repo.default_path', repo_path)
    cfg.set('dpm', 'index.default', 'file')
    cfg.set('index:ckan', 'ckan.url',  'http://thedatahub.org/api/')
    cfg.set('index:ckan', 'ckan.api_key', '')
    cfg.set('index:db', 'db.dburi', 'sqlite://%s/index.db' % repo_path)
    cfg.set('index:db', 'db.dburi', 'sqlite://%s/index.db' % repo_path)
    cfg.set('upload:ckan', 'ofs.backend', 'reststore')
    cfg.set('upload:ckan', 'host', 'http://storage.ckan.net')
    return cfg
        


src/d/p/dpm-old-HEAD/dpm/tests/test_config.py   dpm-old(Download)
    def test_make_default_config(self):
        cfg = dpm.config.make_default_config()
        assert set(cfg.sections()) == set(['dpm', 'index:ckan',
            'index:db', 'upload:ckan']), cfg.sections()
        assert cfg.get('index:ckan', 'ckan.url') == 'http://thedatahub.org/api/'

src/d/p/dpm-0.10/dpm/tests/test_config.py   dpm(Download)
    def test_make_default_config(self):
        cfg = dpm.config.make_default_config()
        assert set(cfg.sections()) == set(['dpm', 'index:ckan',
            'index:db', 'upload:ckan']), cfg.sections()
        assert cfg.get('index:ckan', 'ckan.url') == 'http://thedatahub.org/api/'