Merge branch 'grahamu-testing'
This commit is contained in:
commit
a93598e1e3
5 changed files with 12 additions and 86 deletions
|
@ -7,12 +7,14 @@ env:
|
|||
- DJANGO=1.7
|
||||
- DJANGO=1.8
|
||||
- DJANGO=1.9
|
||||
- DJANGO=1.10
|
||||
matrix:
|
||||
exclude:
|
||||
- python: "3.5"
|
||||
env: DJANGO=1.7
|
||||
install:
|
||||
- pip install -q django==$DJANGO
|
||||
- pip install -e .
|
||||
- pip install tox coveralls
|
||||
script:
|
||||
- PYTHONPATH=$PYTHONPATH:$PWD django-admin.py test oidc_provider --settings=oidc_provider.tests.app.settings
|
||||
- tox -e py${TRAVIS_PYTHON_VERSION//[.]/}-django${DJANGO//[.]/}
|
||||
after_success:
|
||||
- coveralls
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
include LICENSE
|
||||
include README.rst
|
||||
include README.md
|
||||
recursive-include oidc_provider/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'
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
|
|||
|
||||
setup(
|
||||
name='django-oidc-provider',
|
||||
version='0.3.6',
|
||||
version='0.3.7',
|
||||
packages=[
|
||||
'oidc_provider', 'oidc_provider/lib', 'oidc_provider/lib/endpoints',
|
||||
'oidc_provider/lib/utils', 'oidc_provider/tests', 'oidc_provider/tests/app',
|
||||
|
|
9
tox.ini
9
tox.ini
|
@ -1,7 +1,10 @@
|
|||
[tox]
|
||||
|
||||
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]
|
||||
|
||||
|
@ -14,9 +17,7 @@ deps =
|
|||
mock
|
||||
|
||||
commands =
|
||||
pip uninstall --yes django-oidc-provider
|
||||
pip install -e .
|
||||
coverage run --omit=.tox/*,oidc_provider/tests/* {envbindir}/django-admin.py test {posargs:oidc_provider} --settings=oidc_provider.tests.app.settings
|
||||
coverage run setup.py test
|
||||
|
||||
[testenv:clean]
|
||||
|
||||
|
|
Loading…
Reference in a new issue