travis: run django-1.11.18 tests (#328)

This commit is contained in:
Inada Naoki
2019-02-07 20:39:33 +09:00
committed by GitHub
parent 1f6e18d345
commit 9339b153f0
2 changed files with 70 additions and 0 deletions

45
ci/test_mysql.py Normal file
View File

@ -0,0 +1,45 @@
# This is an example test settings file for use with the Django test suite.
#
# The 'sqlite3' backend requires only the ENGINE setting (an in-
# memory database will be used). All other backends will require a
# NAME and potentially authentication information. See the
# following section in the docs for more information:
#
# https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/
#
# The different databases that Django supports behave differently in certain
# situations, so it is recommended to run the test suite against as many
# database backends as possible. You may want to create a separate settings
# file for each of the backends you test against.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'django_default',
'USER': 'django',
'HOST': '127.0.0.1',
'PASSWORD': 'secret',
'TEST': {
'CHARSET': 'utf8mb4',
'COLLATION': 'utf8mb4_general_ci',
},
},
'other': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'django_other',
'USER': 'django',
'HOST': '127.0.0.1',
'PASSWORD': 'secret',
'TEST': {
'CHARSET': 'utf8mb4',
'COLLATION': 'utf8mb4_general_ci',
},
}
}
SECRET_KEY = "django_tests_secret_key"
# Use a fast hasher to speed up tests.
PASSWORD_HASHERS = [
'django.contrib.auth.hashers.MD5PasswordHasher',
]