diff --git a/.travis.yml b/.travis.yml index ef5fcb09a..189d52ae8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ env: - TESTENV=python3.4-1.5-sqlite_file - TESTENV=python3.4-1.6-sqlite_file - TESTENV=python3.4-1.7-sqlite_file + - TESTENV=python3.4-master-custom_user_model - TESTENV=python3.4-master-postgres - TESTENV=python3.4-master-sqlite - TESTENV=python3.4-master-sqlite_file diff --git a/generate_configurations.py b/generate_configurations.py index d8092d514..91625c48b 100644 --- a/generate_configurations.py +++ b/generate_configurations.py @@ -11,7 +11,7 @@ PYTHON_VERSIONS = ['python2.6', 'python2.7', 'python3.2', 'python3.3', 'python3.4', 'pypy'] DJANGO_VERSIONS = ['1.3', '1.4', '1.5', '1.6', '1.7', 'master'] -SETTINGS = ['sqlite', 'sqlite_file', 'mysql_myisam', 'mysql_innodb', 'postgres'] +SETTINGS = ['sqlite', 'sqlite_file', 'mysql_myisam', 'mysql_innodb', 'postgres', 'custom_user_model'] DJANGO_REQUIREMENTS = { '1.3': 'Django==1.3.7', '1.4': 'Django==1.4.13', @@ -57,6 +57,10 @@ def is_valid_env(env): if env.python_version == 'python2.6' and env.django_version in ('1.7', 'master'): return False + # Django 1.5+ supprts custom user models + if env.settings == 'custom_user_model' and env.django_version in ('1.3', '1.4'): + return False + return True diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py index d5a317468..c82f58aea 100644 --- a/pytest_django/fixtures.py +++ b/pytest_django/fixtures.py @@ -10,7 +10,7 @@ from .db_reuse import (monkey_patch_creation_for_db_reuse, monkey_patch_creation_for_db_suffix) from .django_compat import is_django_unittest -from .lazy_django import skip_if_no_django +from .lazy_django import get_django_version, skip_if_no_django __all__ = ['_django_db_setup', 'db', 'transactional_db', 'client', 'admin_client', 'rf', 'settings', 'live_server', @@ -142,19 +142,30 @@ def client(): @pytest.fixture() def admin_client(db): - """A Django test client logged in as an admin user""" - try: + """ + A Django test client logged in as an admin user + + """ + has_custom_user_model_support = get_django_version() >= (1, 5) + + # When using Django >= 1.5 the username field is variable, so + # get 'username field' by using UserModel.USERNAME_FIELD + if has_custom_user_model_support: from django.contrib.auth import get_user_model - User = get_user_model() - except ImportError: - from django.contrib.auth.models import User + UserModel = get_user_model() + username_field = UserModel.USERNAME_FIELD + else: + from django.contrib.auth.models import User as UserModel + username_field = 'username' + from django.test.client import Client try: - User.objects.get(username='admin') - except User.DoesNotExist: - user = User.objects.create_user('admin', 'admin@example.com', - 'password') + UserModel._default_manager.get(**{username_field: 'admin'}) + except UserModel.DoesNotExist: + user = UserModel._default_manager.create_user('admin', + 'admin@example.com', + 'password') user.is_staff = True user.is_superuser = True user.save() diff --git a/pytest_django/lazy_django.py b/pytest_django/lazy_django.py index 4da6c1416..217e5e4ed 100644 --- a/pytest_django/lazy_django.py +++ b/pytest_django/lazy_django.py @@ -31,3 +31,6 @@ def django_settings_is_configured(): "pytest_django: failed to load Django settings: %s" % (e.args)) return settings.configured + +def get_django_version(): + return __import__('django').VERSION diff --git a/tests/custom_user/__init__.py b/tests/custom_user/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/custom_user/models.py b/tests/custom_user/models.py new file mode 100644 index 000000000..d8f951acc --- /dev/null +++ b/tests/custom_user/models.py @@ -0,0 +1,32 @@ +from django.contrib.auth.models import AbstractBaseUser, BaseUserManager +from django.db import models + + +class MyCustomUserManager(BaseUserManager): + def _create_user(self, username, email, password, is_staff, is_superuser, + **extra_fields): + email = self.normalize_email(email) + user = self.model(identifier=username, email=email, is_staff=is_staff, + is_superuser=is_superuser, **extra_fields) + user.set_password(password) + user.save(using=self._db) + return user + + def create_user(self, username, email=None, password=None, **extra_fields): + return self._create_user(username, email, password, False, False, + **extra_fields) + + def create_superuser(self, username, email, password, **extra_fields): + return self._create_user(username, email, password, True, True, + **extra_fields) + + +class MyCustomUser(AbstractBaseUser): + identifier = models.CharField(unique=True, max_length=100) + email = models.EmailField(blank=True) + is_staff = models.BooleanField() + is_superuser = models.BooleanField() + + USERNAME_FIELD = 'identifier' + + objects = MyCustomUserManager() diff --git a/tests/settings_custom_user_model.py b/tests/settings_custom_user_model.py new file mode 100644 index 000000000..a531620ac --- /dev/null +++ b/tests/settings_custom_user_model.py @@ -0,0 +1,14 @@ +from tests.settings_base import * # noqa + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': ':memory:' + }, +} + +INSTALLED_APPS += [ + 'tests.custom_user' +] + +AUTH_USER_MODEL = 'custom_user.MyCustomUser' diff --git a/tests/test_fixtures.py b/tests/test_fixtures.py index a4bfc0479..166810d1f 100644 --- a/tests/test_fixtures.py +++ b/tests/test_fixtures.py @@ -6,7 +6,6 @@ from __future__ import with_statement -import django import pytest from django.conf import settings as real_settings from django.test.client import Client, RequestFactory @@ -16,8 +15,8 @@ from .test_database import noop_transactions from .compat import force_text, urlopen +from pytest_django.lazy_django import get_django_version -django # Avoid pyflakes complaints def test_client(client): @@ -80,7 +79,8 @@ def test_deleted_again(self, settings): class TestLiveServer: pytestmark = [ - pytest.mark.skipif('django.VERSION[:2] < (1, 4)'), + pytest.mark.skipif(get_django_version() < (1, 4), + reason="Django > 1.3 required"), pytest.mark.urls('tests.urls_liveserver'), ] diff --git a/tox.ini b/tox.ini index 8c6de1e39..526c75e30 100644 --- a/tox.ini +++ b/tox.ini @@ -64,6 +64,21 @@ setenv = UID = 3 +[testenv:pypy-1.5-custom_user_model] +commands = + py.test {posargs} +basepython = pypy +deps = + pytest==2.5.2 + pytest-xdist==1.10 + Django==1.5.8 + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 4 + + [testenv:pypy-1.5-sqlite] commands = py.test {posargs} @@ -76,7 +91,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 4 + UID = 5 [testenv:pypy-1.5-sqlite_file] @@ -91,7 +106,22 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 5 + UID = 6 + + +[testenv:pypy-1.6-custom_user_model] +commands = + py.test {posargs} +basepython = pypy +deps = + pytest==2.5.2 + pytest-xdist==1.10 + Django==1.6.5 + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 7 [testenv:pypy-1.6-sqlite] @@ -106,7 +136,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 6 + UID = 8 [testenv:pypy-1.6-sqlite_file] @@ -121,7 +151,22 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 7 + UID = 9 + + +[testenv:pypy-1.7-custom_user_model] +commands = + py.test {posargs} +basepython = pypy +deps = + pytest==2.5.2 + pytest-xdist==1.10 + https://www.djangoproject.com/download/1.7c1/tarball/ + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 10 [testenv:pypy-1.7-sqlite] @@ -136,7 +181,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 8 + UID = 11 [testenv:pypy-1.7-sqlite_file] @@ -151,7 +196,22 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 9 + UID = 12 + + +[testenv:pypy-master-custom_user_model] +commands = + py.test {posargs} +basepython = pypy +deps = + pytest==2.5.2 + pytest-xdist==1.10 + https://github.com/django/django/archive/master.zip + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 13 [testenv:pypy-master-sqlite] @@ -166,7 +226,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 10 + UID = 14 [testenv:pypy-master-sqlite_file] @@ -181,12 +241,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 11 + UID = 15 [testenv:python2.6-1.3-mysql_innodb] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_12; create database pytest_django_12'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_16; create database pytest_django_16'" || exit 0 py.test {posargs} basepython = python2.6 deps = @@ -198,12 +258,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_innodb PYTHONPATH = {toxinidir} - UID = 12 + UID = 16 [testenv:python2.6-1.3-mysql_myisam] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_13; create database pytest_django_13'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_17; create database pytest_django_17'" || exit 0 py.test {posargs} basepython = python2.6 deps = @@ -215,12 +275,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_myisam PYTHONPATH = {toxinidir} - UID = 13 + UID = 17 [testenv:python2.6-1.3-postgres] commands = - sh -c "dropdb pytest_django_14; createdb pytest_django_14 || exit 0" + sh -c "dropdb pytest_django_18; createdb pytest_django_18 || exit 0" py.test {posargs} basepython = python2.6 deps = @@ -232,7 +292,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 14 + UID = 18 [testenv:python2.6-1.3-sqlite] @@ -247,7 +307,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 15 + UID = 19 [testenv:python2.6-1.3-sqlite_file] @@ -262,12 +322,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 16 + UID = 20 [testenv:python2.6-1.4-mysql_innodb] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_17; create database pytest_django_17'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_21; create database pytest_django_21'" || exit 0 py.test {posargs} basepython = python2.6 deps = @@ -279,12 +339,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_innodb PYTHONPATH = {toxinidir} - UID = 17 + UID = 21 [testenv:python2.6-1.4-mysql_myisam] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_18; create database pytest_django_18'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_22; create database pytest_django_22'" || exit 0 py.test {posargs} basepython = python2.6 deps = @@ -296,12 +356,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_myisam PYTHONPATH = {toxinidir} - UID = 18 + UID = 22 [testenv:python2.6-1.4-postgres] commands = - sh -c "dropdb pytest_django_19; createdb pytest_django_19 || exit 0" + sh -c "dropdb pytest_django_23; createdb pytest_django_23 || exit 0" py.test {posargs} basepython = python2.6 deps = @@ -313,7 +373,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 19 + UID = 23 [testenv:python2.6-1.4-sqlite] @@ -328,7 +388,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 20 + UID = 24 [testenv:python2.6-1.4-sqlite_file] @@ -343,12 +403,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 21 + UID = 25 + + +[testenv:python2.6-1.5-custom_user_model] +commands = + py.test {posargs} +basepython = python2.6 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + Django==1.5.8 + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 26 [testenv:python2.6-1.5-mysql_innodb] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_22; create database pytest_django_22'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_27; create database pytest_django_27'" || exit 0 py.test {posargs} basepython = python2.6 deps = @@ -360,12 +435,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_innodb PYTHONPATH = {toxinidir} - UID = 22 + UID = 27 [testenv:python2.6-1.5-mysql_myisam] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_23; create database pytest_django_23'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_28; create database pytest_django_28'" || exit 0 py.test {posargs} basepython = python2.6 deps = @@ -377,12 +452,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_myisam PYTHONPATH = {toxinidir} - UID = 23 + UID = 28 [testenv:python2.6-1.5-postgres] commands = - sh -c "dropdb pytest_django_24; createdb pytest_django_24 || exit 0" + sh -c "dropdb pytest_django_29; createdb pytest_django_29 || exit 0" py.test {posargs} basepython = python2.6 deps = @@ -394,7 +469,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 24 + UID = 29 [testenv:python2.6-1.5-sqlite] @@ -409,7 +484,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 25 + UID = 30 [testenv:python2.6-1.5-sqlite_file] @@ -424,12 +499,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 26 + UID = 31 + + +[testenv:python2.6-1.6-custom_user_model] +commands = + py.test {posargs} +basepython = python2.6 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + Django==1.6.5 + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 32 [testenv:python2.6-1.6-mysql_innodb] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_27; create database pytest_django_27'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_33; create database pytest_django_33'" || exit 0 py.test {posargs} basepython = python2.6 deps = @@ -441,12 +531,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_innodb PYTHONPATH = {toxinidir} - UID = 27 + UID = 33 [testenv:python2.6-1.6-mysql_myisam] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_28; create database pytest_django_28'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_34; create database pytest_django_34'" || exit 0 py.test {posargs} basepython = python2.6 deps = @@ -458,12 +548,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_myisam PYTHONPATH = {toxinidir} - UID = 28 + UID = 34 [testenv:python2.6-1.6-postgres] commands = - sh -c "dropdb pytest_django_29; createdb pytest_django_29 || exit 0" + sh -c "dropdb pytest_django_35; createdb pytest_django_35 || exit 0" py.test {posargs} basepython = python2.6 deps = @@ -475,7 +565,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 29 + UID = 35 [testenv:python2.6-1.6-sqlite] @@ -490,7 +580,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 30 + UID = 36 [testenv:python2.6-1.6-sqlite_file] @@ -505,12 +595,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 31 + UID = 37 [testenv:python2.7-1.3-mysql_innodb] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_32; create database pytest_django_32'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_38; create database pytest_django_38'" || exit 0 py.test {posargs} basepython = python2.7 deps = @@ -522,12 +612,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_innodb PYTHONPATH = {toxinidir} - UID = 32 + UID = 38 [testenv:python2.7-1.3-mysql_myisam] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_33; create database pytest_django_33'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_39; create database pytest_django_39'" || exit 0 py.test {posargs} basepython = python2.7 deps = @@ -539,12 +629,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_myisam PYTHONPATH = {toxinidir} - UID = 33 + UID = 39 [testenv:python2.7-1.3-postgres] commands = - sh -c "dropdb pytest_django_34; createdb pytest_django_34 || exit 0" + sh -c "dropdb pytest_django_40; createdb pytest_django_40 || exit 0" py.test {posargs} basepython = python2.7 deps = @@ -556,7 +646,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 34 + UID = 40 [testenv:python2.7-1.3-sqlite] @@ -571,7 +661,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 35 + UID = 41 [testenv:python2.7-1.3-sqlite_file] @@ -586,12 +676,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 36 + UID = 42 [testenv:python2.7-1.4-mysql_innodb] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_37; create database pytest_django_37'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_43; create database pytest_django_43'" || exit 0 py.test {posargs} basepython = python2.7 deps = @@ -603,12 +693,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_innodb PYTHONPATH = {toxinidir} - UID = 37 + UID = 43 [testenv:python2.7-1.4-mysql_myisam] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_38; create database pytest_django_38'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_44; create database pytest_django_44'" || exit 0 py.test {posargs} basepython = python2.7 deps = @@ -620,12 +710,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_myisam PYTHONPATH = {toxinidir} - UID = 38 + UID = 44 [testenv:python2.7-1.4-postgres] commands = - sh -c "dropdb pytest_django_39; createdb pytest_django_39 || exit 0" + sh -c "dropdb pytest_django_45; createdb pytest_django_45 || exit 0" py.test {posargs} basepython = python2.7 deps = @@ -637,7 +727,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 39 + UID = 45 [testenv:python2.7-1.4-sqlite] @@ -652,7 +742,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 40 + UID = 46 [testenv:python2.7-1.4-sqlite_file] @@ -667,12 +757,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 41 + UID = 47 + + +[testenv:python2.7-1.5-custom_user_model] +commands = + py.test {posargs} +basepython = python2.7 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + Django==1.5.8 + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 48 [testenv:python2.7-1.5-mysql_innodb] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_42; create database pytest_django_42'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_49; create database pytest_django_49'" || exit 0 py.test {posargs} basepython = python2.7 deps = @@ -684,12 +789,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_innodb PYTHONPATH = {toxinidir} - UID = 42 + UID = 49 [testenv:python2.7-1.5-mysql_myisam] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_43; create database pytest_django_43'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_50; create database pytest_django_50'" || exit 0 py.test {posargs} basepython = python2.7 deps = @@ -701,12 +806,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_myisam PYTHONPATH = {toxinidir} - UID = 43 + UID = 50 [testenv:python2.7-1.5-postgres] commands = - sh -c "dropdb pytest_django_44; createdb pytest_django_44 || exit 0" + sh -c "dropdb pytest_django_51; createdb pytest_django_51 || exit 0" py.test {posargs} basepython = python2.7 deps = @@ -718,7 +823,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 44 + UID = 51 [testenv:python2.7-1.5-sqlite] @@ -733,7 +838,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 45 + UID = 52 [testenv:python2.7-1.5-sqlite_file] @@ -748,12 +853,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 46 + UID = 53 + + +[testenv:python2.7-1.6-custom_user_model] +commands = + py.test {posargs} +basepython = python2.7 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + Django==1.6.5 + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 54 [testenv:python2.7-1.6-mysql_innodb] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_47; create database pytest_django_47'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_55; create database pytest_django_55'" || exit 0 py.test {posargs} basepython = python2.7 deps = @@ -765,12 +885,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_innodb PYTHONPATH = {toxinidir} - UID = 47 + UID = 55 [testenv:python2.7-1.6-mysql_myisam] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_48; create database pytest_django_48'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_56; create database pytest_django_56'" || exit 0 py.test {posargs} basepython = python2.7 deps = @@ -782,12 +902,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_myisam PYTHONPATH = {toxinidir} - UID = 48 + UID = 56 [testenv:python2.7-1.6-postgres] commands = - sh -c "dropdb pytest_django_49; createdb pytest_django_49 || exit 0" + sh -c "dropdb pytest_django_57; createdb pytest_django_57 || exit 0" py.test {posargs} basepython = python2.7 deps = @@ -799,7 +919,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 49 + UID = 57 [testenv:python2.7-1.6-sqlite] @@ -814,7 +934,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 50 + UID = 58 [testenv:python2.7-1.6-sqlite_file] @@ -829,12 +949,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 51 + UID = 59 + + +[testenv:python2.7-1.7-custom_user_model] +commands = + py.test {posargs} +basepython = python2.7 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + https://www.djangoproject.com/download/1.7c1/tarball/ + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 60 [testenv:python2.7-1.7-mysql_innodb] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_52; create database pytest_django_52'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_61; create database pytest_django_61'" || exit 0 py.test {posargs} basepython = python2.7 deps = @@ -846,12 +981,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_innodb PYTHONPATH = {toxinidir} - UID = 52 + UID = 61 [testenv:python2.7-1.7-mysql_myisam] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_53; create database pytest_django_53'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_62; create database pytest_django_62'" || exit 0 py.test {posargs} basepython = python2.7 deps = @@ -863,12 +998,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_myisam PYTHONPATH = {toxinidir} - UID = 53 + UID = 62 [testenv:python2.7-1.7-postgres] commands = - sh -c "dropdb pytest_django_54; createdb pytest_django_54 || exit 0" + sh -c "dropdb pytest_django_63; createdb pytest_django_63 || exit 0" py.test {posargs} basepython = python2.7 deps = @@ -880,7 +1015,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 54 + UID = 63 [testenv:python2.7-1.7-sqlite] @@ -895,7 +1030,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 55 + UID = 64 [testenv:python2.7-1.7-sqlite_file] @@ -910,12 +1045,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 56 + UID = 65 + + +[testenv:python2.7-master-custom_user_model] +commands = + py.test {posargs} +basepython = python2.7 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + https://github.com/django/django/archive/master.zip + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 66 [testenv:python2.7-master-mysql_innodb] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_57; create database pytest_django_57'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_67; create database pytest_django_67'" || exit 0 py.test {posargs} basepython = python2.7 deps = @@ -927,12 +1077,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_innodb PYTHONPATH = {toxinidir} - UID = 57 + UID = 67 [testenv:python2.7-master-mysql_myisam] commands = - sh -c "mysql -u root -e 'drop database if exists pytest_django_58; create database pytest_django_58'" || exit 0 + sh -c "mysql -u root -e 'drop database if exists pytest_django_68; create database pytest_django_68'" || exit 0 py.test {posargs} basepython = python2.7 deps = @@ -944,12 +1094,12 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_mysql_myisam PYTHONPATH = {toxinidir} - UID = 58 + UID = 68 [testenv:python2.7-master-postgres] commands = - sh -c "dropdb pytest_django_59; createdb pytest_django_59 || exit 0" + sh -c "dropdb pytest_django_69; createdb pytest_django_69 || exit 0" py.test {posargs} basepython = python2.7 deps = @@ -961,7 +1111,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 59 + UID = 69 [testenv:python2.7-master-sqlite] @@ -976,7 +1126,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 60 + UID = 70 [testenv:python2.7-master-sqlite_file] @@ -991,12 +1141,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 61 + UID = 71 + + +[testenv:python3.2-1.5-custom_user_model] +commands = + py.test {posargs} +basepython = python3.2 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + Django==1.5.8 + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 72 [testenv:python3.2-1.5-postgres] commands = - sh -c "dropdb pytest_django_62; createdb pytest_django_62 || exit 0" + sh -c "dropdb pytest_django_73; createdb pytest_django_73 || exit 0" py.test {posargs} basepython = python3.2 deps = @@ -1008,7 +1173,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 62 + UID = 73 [testenv:python3.2-1.5-sqlite] @@ -1023,7 +1188,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 63 + UID = 74 [testenv:python3.2-1.5-sqlite_file] @@ -1038,12 +1203,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 64 + UID = 75 + + +[testenv:python3.2-1.6-custom_user_model] +commands = + py.test {posargs} +basepython = python3.2 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + Django==1.6.5 + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 76 [testenv:python3.2-1.6-postgres] commands = - sh -c "dropdb pytest_django_65; createdb pytest_django_65 || exit 0" + sh -c "dropdb pytest_django_77; createdb pytest_django_77 || exit 0" py.test {posargs} basepython = python3.2 deps = @@ -1055,7 +1235,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 65 + UID = 77 [testenv:python3.2-1.6-sqlite] @@ -1070,7 +1250,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 66 + UID = 78 [testenv:python3.2-1.6-sqlite_file] @@ -1085,12 +1265,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 67 + UID = 79 + + +[testenv:python3.2-1.7-custom_user_model] +commands = + py.test {posargs} +basepython = python3.2 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + https://www.djangoproject.com/download/1.7c1/tarball/ + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 80 [testenv:python3.2-1.7-postgres] commands = - sh -c "dropdb pytest_django_68; createdb pytest_django_68 || exit 0" + sh -c "dropdb pytest_django_81; createdb pytest_django_81 || exit 0" py.test {posargs} basepython = python3.2 deps = @@ -1102,7 +1297,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 68 + UID = 81 [testenv:python3.2-1.7-sqlite] @@ -1117,7 +1312,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 69 + UID = 82 [testenv:python3.2-1.7-sqlite_file] @@ -1132,12 +1327,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 70 + UID = 83 + + +[testenv:python3.2-master-custom_user_model] +commands = + py.test {posargs} +basepython = python3.2 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + https://github.com/django/django/archive/master.zip + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 84 [testenv:python3.2-master-postgres] commands = - sh -c "dropdb pytest_django_71; createdb pytest_django_71 || exit 0" + sh -c "dropdb pytest_django_85; createdb pytest_django_85 || exit 0" py.test {posargs} basepython = python3.2 deps = @@ -1149,7 +1359,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 71 + UID = 85 [testenv:python3.2-master-sqlite] @@ -1164,7 +1374,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 72 + UID = 86 [testenv:python3.2-master-sqlite_file] @@ -1179,12 +1389,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 73 + UID = 87 + + +[testenv:python3.3-1.5-custom_user_model] +commands = + py.test {posargs} +basepython = python3.3 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + Django==1.5.8 + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 88 [testenv:python3.3-1.5-postgres] commands = - sh -c "dropdb pytest_django_74; createdb pytest_django_74 || exit 0" + sh -c "dropdb pytest_django_89; createdb pytest_django_89 || exit 0" py.test {posargs} basepython = python3.3 deps = @@ -1196,7 +1421,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 74 + UID = 89 [testenv:python3.3-1.5-sqlite] @@ -1211,7 +1436,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 75 + UID = 90 [testenv:python3.3-1.5-sqlite_file] @@ -1226,12 +1451,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 76 + UID = 91 + + +[testenv:python3.3-1.6-custom_user_model] +commands = + py.test {posargs} +basepython = python3.3 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + Django==1.6.5 + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 92 [testenv:python3.3-1.6-postgres] commands = - sh -c "dropdb pytest_django_77; createdb pytest_django_77 || exit 0" + sh -c "dropdb pytest_django_93; createdb pytest_django_93 || exit 0" py.test {posargs} basepython = python3.3 deps = @@ -1243,7 +1483,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 77 + UID = 93 [testenv:python3.3-1.6-sqlite] @@ -1258,7 +1498,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 78 + UID = 94 [testenv:python3.3-1.6-sqlite_file] @@ -1273,12 +1513,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 79 + UID = 95 + + +[testenv:python3.3-1.7-custom_user_model] +commands = + py.test {posargs} +basepython = python3.3 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + https://www.djangoproject.com/download/1.7c1/tarball/ + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 96 [testenv:python3.3-1.7-postgres] commands = - sh -c "dropdb pytest_django_80; createdb pytest_django_80 || exit 0" + sh -c "dropdb pytest_django_97; createdb pytest_django_97 || exit 0" py.test {posargs} basepython = python3.3 deps = @@ -1290,7 +1545,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 80 + UID = 97 [testenv:python3.3-1.7-sqlite] @@ -1305,7 +1560,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 81 + UID = 98 [testenv:python3.3-1.7-sqlite_file] @@ -1320,12 +1575,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 82 + UID = 99 + + +[testenv:python3.3-master-custom_user_model] +commands = + py.test {posargs} +basepython = python3.3 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + https://github.com/django/django/archive/master.zip + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 100 [testenv:python3.3-master-postgres] commands = - sh -c "dropdb pytest_django_83; createdb pytest_django_83 || exit 0" + sh -c "dropdb pytest_django_101; createdb pytest_django_101 || exit 0" py.test {posargs} basepython = python3.3 deps = @@ -1337,7 +1607,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 83 + UID = 101 [testenv:python3.3-master-sqlite] @@ -1352,7 +1622,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 84 + UID = 102 [testenv:python3.3-master-sqlite_file] @@ -1367,12 +1637,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 85 + UID = 103 + + +[testenv:python3.4-1.5-custom_user_model] +commands = + py.test {posargs} +basepython = python3.4 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + Django==1.5.8 + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 104 [testenv:python3.4-1.5-postgres] commands = - sh -c "dropdb pytest_django_86; createdb pytest_django_86 || exit 0" + sh -c "dropdb pytest_django_105; createdb pytest_django_105 || exit 0" py.test {posargs} basepython = python3.4 deps = @@ -1384,7 +1669,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 86 + UID = 105 [testenv:python3.4-1.5-sqlite] @@ -1399,7 +1684,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 87 + UID = 106 [testenv:python3.4-1.5-sqlite_file] @@ -1414,12 +1699,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 88 + UID = 107 + + +[testenv:python3.4-1.6-custom_user_model] +commands = + py.test {posargs} +basepython = python3.4 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + Django==1.6.5 + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 108 [testenv:python3.4-1.6-postgres] commands = - sh -c "dropdb pytest_django_89; createdb pytest_django_89 || exit 0" + sh -c "dropdb pytest_django_109; createdb pytest_django_109 || exit 0" py.test {posargs} basepython = python3.4 deps = @@ -1431,7 +1731,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 89 + UID = 109 [testenv:python3.4-1.6-sqlite] @@ -1446,7 +1746,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 90 + UID = 110 [testenv:python3.4-1.6-sqlite_file] @@ -1461,12 +1761,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 91 + UID = 111 + + +[testenv:python3.4-1.7-custom_user_model] +commands = + py.test {posargs} +basepython = python3.4 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + https://www.djangoproject.com/download/1.7c1/tarball/ + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 112 [testenv:python3.4-1.7-postgres] commands = - sh -c "dropdb pytest_django_92; createdb pytest_django_92 || exit 0" + sh -c "dropdb pytest_django_113; createdb pytest_django_113 || exit 0" py.test {posargs} basepython = python3.4 deps = @@ -1478,7 +1793,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 92 + UID = 113 [testenv:python3.4-1.7-sqlite] @@ -1493,7 +1808,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 93 + UID = 114 [testenv:python3.4-1.7-sqlite_file] @@ -1508,12 +1823,27 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 94 + UID = 115 + + +[testenv:python3.4-master-custom_user_model] +commands = + py.test {posargs} +basepython = python3.4 +deps = + pytest==2.5.2 + pytest-xdist==1.10 + https://github.com/django/django/archive/master.zip + django-configurations==0.8 +setenv = + DJANGO_SETTINGS_MODULE = tests.settings_custom_user_model + PYTHONPATH = {toxinidir} + UID = 116 [testenv:python3.4-master-postgres] commands = - sh -c "dropdb pytest_django_95; createdb pytest_django_95 || exit 0" + sh -c "dropdb pytest_django_117; createdb pytest_django_117 || exit 0" py.test {posargs} basepython = python3.4 deps = @@ -1525,7 +1855,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_postgres PYTHONPATH = {toxinidir} - UID = 95 + UID = 117 [testenv:python3.4-master-sqlite] @@ -1540,7 +1870,7 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite PYTHONPATH = {toxinidir} - UID = 96 + UID = 118 [testenv:python3.4-master-sqlite_file] @@ -1555,4 +1885,4 @@ deps = setenv = DJANGO_SETTINGS_MODULE = tests.settings_sqlite_file PYTHONPATH = {toxinidir} - UID = 97 + UID = 119