Commit a677677b authored by David Read's avatar David Read
Browse files

Merge pull request #27 from ckan/travis-fix

Travis fix
parents 25fe827e 28cfd602
......@@ -30,6 +30,12 @@ cd ckan
paster db init -c test-core.ini
cd -
echo "SOLR config..."
# solr is multicore for tests on ckan master now, but it's easier to run tests
# on Travis single-core still.
# see https://github.com/ckan/ckan/issues/2972
sed -i -e 's/solr_url.*/solr_url = http:\/\/127.0.0.1:8983\/solr/' ckan/test-core.ini
echo "Installing dependency ckanext-report and its requirements..."
pip install -e git+https://github.com/datagovuk/ckanext-report.git#egg=ckanext-report
......
......@@ -30,14 +30,6 @@ class ArchiverPlugin(p.SingletonPlugin, p.toolkit.DefaultDatasetForm):
# IDomainObjectModification
def notify(self, entity, operation=None):
if not p.toolkit.check_ckan_version('2.3'):
self._notify(entity, operation)
def notify_after_commit(self, entity, operation=None):
if p.toolkit.check_ckan_version('2.3'):
self._notify(entity, operation)
def _notify(self, entity, operation=None):
if not isinstance(entity, model.Package):
return
......
......@@ -340,13 +340,13 @@ class TestArchiver(BaseCase):
def test_package_achived_when_resource_modified(self, url, send_task):
data_dict = self._test_resource(url)
data_dict['url'] = 'http://example.com/foo'
context = {'model': model,
context = {'model': model,
'user': 'test',
'ignore_auth': True,
'session': model.Session}
result = get_action('resource_update')(context, data_dict)
assert send_task.called == True
assert_equal(send_task.called, True)
args, kwargs = send_task.call_args
assert args == ('archiver.update_package',)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment