Skip to content

Commit

Permalink
Database engine fix for prehistoric Django versions
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Dec 11, 2018
1 parent 9105fb7 commit a352e5a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/testapp/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

BASE_DIR = os.path.dirname(os.path.dirname(__file__))

DATABASES = {"default": {"ENGINE": "django.db.backends.postgresql", "NAME": "cabinet"}}
DATABASES = {
"default": {"ENGINE": "django.db.backends.postgresql_psycopg2", "NAME": "cabinet"}
}
if os.environ.get("DB") == "sqlite3":
DATABASES = {
"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}
Expand Down
15 changes: 15 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,18 @@ setenv =
commands =
coverage run tests/manage.py test -v 2 {posargs:testapp}
coverage html

[testenv:tests-prehistoric]
deps =
Django<1.9
coverage
django-imagefield
django-tree-queries
Pillow
changedir = {toxinidir}
skip_install = true
setenv =
DB=sqlite3
commands =
coverage run tests/manage.py test -v 2 {posargs:testapp}
coverage html

0 comments on commit a352e5a

Please sign in to comment.