diff --git a/.travis.yml b/.travis.yml index b2d8b48731..79ed17804a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,10 +22,13 @@ install: before_script: - psql -c 'CREATE DATABASE travis_test;' -U postgres + - python manage.py migrate --noinput + - python manage.py runserver & script: - - python manage.py test akvo.rsr.tests.iati_import - - coverage run --source=akvo manage.py test akvo.rsr.tests.iati_import + - python manage.py collectstatic --noinput + - python manage.py test --noinput akvo.rsr.tests + - coverage run --source=akvo manage.py test akvo.rsr.tests after_success: - coveralls diff --git a/akvo/rsr/tests/iati_export/test_iati_export.py b/akvo/rsr/tests/iati_export/test_iati_export.py index c6c49d84f3..2fae2fdf2c 100644 --- a/akvo/rsr/tests/iati_export/test_iati_export.py +++ b/akvo/rsr/tests/iati_export/test_iati_export.py @@ -95,7 +95,7 @@ def test_valid_xml(self): self.assertNotEqual(iati_export.iati_file, '') # Get XML string of file - tree = ElementTree.parse(iati_export.iati_file) + tree = ElementTree.parse(iati_export.iati_file.file) root = tree.getroot() root_tostring = ElementTree.tostring(root, encoding='utf8', method='xml') diff --git a/akvo/settings/80-travis.conf b/akvo/settings/80-travis.conf index b01dc136e5..74f4d4b0d5 100644 --- a/akvo/settings/80-travis.conf +++ b/akvo/settings/80-travis.conf @@ -1,6 +1,9 @@ import os if 'TRAVIS' in os.environ: + STATICFILES_STORAGE='pipeline.storage.NonPackagingPipelineStorage' + PIPELINE_ENABLED=False + DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2',