Improve tox.ini envlist layout, simplified commands.
Remove tests/app/settings.py in favor of settings in setup.py. Change MANIFEST.in to include README.md (which exists) instead of README.rst (which does not exist). Update .travis.yml to use tox instead of `python django_admin.py`, include Django v1.10 in the mix.
This commit is contained in:
parent
ce4582f585
commit
b8d1d63c28
4 changed files with 11 additions and 85 deletions
|
@ -7,12 +7,14 @@ env:
|
||||||
- DJANGO=1.7
|
- DJANGO=1.7
|
||||||
- DJANGO=1.8
|
- DJANGO=1.8
|
||||||
- DJANGO=1.9
|
- DJANGO=1.9
|
||||||
|
- DJANGO=1.10
|
||||||
matrix:
|
matrix:
|
||||||
exclude:
|
exclude:
|
||||||
- python: "3.5"
|
- python: "3.5"
|
||||||
env: DJANGO=1.7
|
env: DJANGO=1.7
|
||||||
install:
|
install:
|
||||||
- pip install -q django==$DJANGO
|
- pip install tox coveralls
|
||||||
- pip install -e .
|
|
||||||
script:
|
script:
|
||||||
- PYTHONPATH=$PYTHONPATH:$PWD django-admin.py test oidc_provider --settings=oidc_provider.tests.app.settings
|
- tox -e py${TRAVIS_PYTHON_VERSION//[.]/}-$DJANGO
|
||||||
|
after_success:
|
||||||
|
- coveralls
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
include LICENSE
|
include LICENSE
|
||||||
include README.rst
|
include README.md
|
||||||
recursive-include oidc_provider/templates *
|
recursive-include oidc_provider/templates *
|
||||||
recursive-include oidc_provider/tests/templates *
|
recursive-include oidc_provider/tests/templates *
|
||||||
|
|
|
@ -1,77 +0,0 @@
|
||||||
import os
|
|
||||||
from datetime import timedelta
|
|
||||||
|
|
||||||
|
|
||||||
DEBUG = False
|
|
||||||
|
|
||||||
DATABASES = {
|
|
||||||
'default': {
|
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
|
||||||
'NAME': ':memory:',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SITE_ID = 1
|
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = [
|
|
||||||
'django.middleware.common.CommonMiddleware',
|
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
||||||
]
|
|
||||||
|
|
||||||
TEMPLATES = [
|
|
||||||
{
|
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
||||||
'DIRS': [],
|
|
||||||
'APP_DIRS': True,
|
|
||||||
'OPTIONS': {
|
|
||||||
'context_processors': [
|
|
||||||
'django.template.context_processors.debug',
|
|
||||||
'django.template.context_processors.request',
|
|
||||||
'django.contrib.auth.context_processors.auth',
|
|
||||||
'django.contrib.messages.context_processors.messages',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
LOGGING = {
|
|
||||||
'version': 1,
|
|
||||||
'disable_existing_loggers': False,
|
|
||||||
'handlers': {
|
|
||||||
'console': {
|
|
||||||
'class': 'logging.StreamHandler',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'loggers': {
|
|
||||||
'oidc_provider': {
|
|
||||||
'handlers': ['console'],
|
|
||||||
'level': os.getenv('DJANGO_LOG_LEVEL', 'DEBUG'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
|
||||||
'django.contrib.auth',
|
|
||||||
'django.contrib.contenttypes',
|
|
||||||
'django.contrib.sessions',
|
|
||||||
'django.contrib.sites',
|
|
||||||
'django.contrib.messages',
|
|
||||||
'django.contrib.admin',
|
|
||||||
'oidc_provider',
|
|
||||||
]
|
|
||||||
|
|
||||||
SECRET_KEY = 'this-should-be-top-secret'
|
|
||||||
|
|
||||||
ROOT_URLCONF = 'oidc_provider.tests.app.urls'
|
|
||||||
|
|
||||||
TEMPLATE_DIRS = [
|
|
||||||
'oidc_provider/tests/templates',
|
|
||||||
]
|
|
||||||
|
|
||||||
USE_TZ = True
|
|
||||||
|
|
||||||
# OIDC Provider settings.
|
|
||||||
|
|
||||||
SITE_URL = 'http://localhost:8000'
|
|
||||||
OIDC_USERINFO = 'oidc_provider.tests.app.utils.userinfo'
|
|
9
tox.ini
9
tox.ini
|
@ -1,7 +1,10 @@
|
||||||
[tox]
|
[tox]
|
||||||
|
|
||||||
envlist=
|
envlist=
|
||||||
clean,py{27,34}-django{17,18,19,110},py35-django{18,19,110},stats
|
clean,
|
||||||
|
py27-django{17,18,19,110},
|
||||||
|
py34-django{17,18,19,110},
|
||||||
|
py35-django{18,19,110},
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
|
||||||
|
@ -14,9 +17,7 @@ deps =
|
||||||
mock
|
mock
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
pip uninstall --yes django-oidc-provider
|
coverage run setup.py test
|
||||||
pip install -e .
|
|
||||||
coverage run --omit=.tox/*,oidc_provider/tests/* {envbindir}/django-admin.py test {posargs:oidc_provider} --settings=oidc_provider.tests.app.settings
|
|
||||||
|
|
||||||
[testenv:clean]
|
[testenv:clean]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue