Configure tests for Django 2.1

This commit is contained in:
Alieh Rymašeŭski 2019-05-10 18:43:36 +03:00
parent 62c1e676cc
commit 03b8616dac
2 changed files with 4 additions and 2 deletions

View file

@ -33,6 +33,6 @@ class PostgresRouter(object):
Make sure the postgres app only appears in the 'postgres db'
database.
"""
if model_name.startswith('postgres'):
if model_name and model_name.startswith('postgres'):
return db == 'postgres'
return None

View file

@ -4,6 +4,7 @@ envlist =
{py27,py34,py35,py36}-django-110
{py27,py34,py35,py36}-django-111
{py34,py35,py36}-django-20
{py35,py36}-django-21
[testenv]
setenv =
@ -13,7 +14,8 @@ deps =
django-18: Django>=1.8,<1.9
django-110: Django>=1.10,<1.11
django-111: Django>=1.11,<2.0
django-20: Django>=2.0
django-20: Django>=2.0,<2.1
django-21: Django>=2.1,<2.2
-r{toxinidir}/requirements-test.txt
basepython =
py36: python3.6