diff --git a/.travis.yml b/.travis.yml index ed24a19..a0047dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ before_script: - psql -c 'create database modeltranslation;' -U postgres install: - if [[ $DB == mysql ]]; then pip install -q mysqlclient; fi - - if [[ $DB == postgres ]]; then pip install -q psycopg2; fi + - if [[ $DB == postgres ]]; then pip install -q psycopg2-binary; fi - pip install -q Pillow - IDJANGO=$(./travis.py $DJANGO) - pip install -q $IDJANGO diff --git a/modeltranslation/tests/tests.py b/modeltranslation/tests/tests.py index 10ebc11..a578f1f 100644 --- a/modeltranslation/tests/tests.py +++ b/modeltranslation/tests/tests.py @@ -3026,8 +3026,7 @@ class TestManager(ModeltranslationTestBase): # the distinct applies to (this generates a DISTINCT ON (*fields) sql expression). # NB: DISTINCT ON expressions must be accompanied by an order_by() that starts with the # same fields in the same order - if (django_settings.DATABASES['default']['ENGINE'] == - 'django.db.backends.postgresql_psycopg2'): + if django_settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql': titles_for_en = tuple( (m.title, m.description) for m in manager.order_by( 'title', 'description').distinct('title')) diff --git a/runtests.py b/runtests.py index 6795fbb..41ce79f 100755 --- a/runtests.py +++ b/runtests.py @@ -27,7 +27,7 @@ def runtests(test_path='modeltranslation'): }) elif test_db == 'postgres': DATABASES['default'].update({ - 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'ENGINE': 'django.db.backends.postgresql', 'USER': 'postgres', 'NAME': 'modeltranslation', })