def setup_class(cls): config = appconfig('config:test.ini', relative_to=conf_dir) for key in config.local_conf.keys(): if key.startswith('ofs'): del config.local_conf[key] config.local_conf['ofs.impl'] = 'pairtree' config.local_conf['ckan.storage.bucket'] = 'ckantest' config.local_conf['ofs.storage_dir'] = '/tmp/ckan-test-ckanext-storage' create_pairtree_marker( config.local_conf['ofs.storage_dir'] ) wsgiapp = make_app(config.global_conf, **config.local_conf) cls.app = paste.fixture.TestApp(wsgiapp)
def setup_class(cls): cls._original_config = config.copy() for key in config.keys(): if key.startswith('ofs'): del config[key] config['ofs.impl'] = 'pairtree' config['ckan.storage.bucket'] = 'ckantest' config['ofs.storage_dir'] = '/tmp/ckan-test-ckanext-storage' create_pairtree_marker( config['ofs.storage_dir'] ) wsgiapp = make_app(config['global_conf'], **config) cls.app = paste.fixture.TestApp(wsgiapp) CreateTestData.create_test_user()
def setup_class(cls): config = appconfig('config:test.ini', relative_to=conf_dir) for key in config.local_conf.keys(): if key.startswith('ofs'): del config.local_conf[key] config.local_conf['ckan.storage.bucket'] = 'ckantest' config.local_conf['ofs.impl'] = 'pairtree' config.local_conf['ofs.storage_dir'] = '/tmp/ckan-test-ckanext-storage' create_pairtree_marker( config.local_conf['ofs.storage_dir'] ) wsgiapp = make_app(config.global_conf, **config.local_conf) cls.app = paste.fixture.TestApp(wsgiapp) CreateTestData.create() model.Session.remove() user = model.User.by_name('tester') cls.extra_environ = {'Authorization': str(user.apikey)}