starts tests
This commit is contained in:
parent
710058d8ec
commit
ba8ee7abdc
|
@ -0,0 +1,11 @@
|
|||
import os.path
|
||||
|
||||
INSTALLED_APPS = (
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.sessions',
|
||||
'django_kerberos',
|
||||
)
|
||||
TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), 'templates'),)
|
||||
ROOT_URLCONF = 'django_kerberos.urls'
|
||||
SECRET_KEY = 'xxx'
|
|
@ -0,0 +1,2 @@
|
|||
{% block content %}
|
||||
{% endblock %}
|
|
@ -0,0 +1,10 @@
|
|||
import pytest
|
||||
|
||||
import kerberos
|
||||
|
||||
|
||||
def test_login_no_header(client, settings):
|
||||
print client.get('/login/')
|
||||
|
||||
def test_login_negotiate_wrong(client, settings):
|
||||
print client.get('/login/', HTTP_AUTHORIZATION='Negotiate coin')
|
|
@ -0,0 +1,18 @@
|
|||
# Tox (http://tox.testrun.org/) is a tool for running tests
|
||||
# in multiple virtualenvs. This configuration file will run the
|
||||
# test suite on all supported python versions. To use it, "pip install tox"
|
||||
# and then run "tox" from this directory.
|
||||
|
||||
[testenv]
|
||||
# django.contrib.auth is not tested it does not work with our templates
|
||||
setenv=
|
||||
DJANGO_SETTINGS_MODULE=settings
|
||||
PYTHONPATH=src:tests
|
||||
commands =
|
||||
py.test --cov=src/ tests
|
||||
usedevelop = True
|
||||
deps = coverage
|
||||
pytest
|
||||
pytest-mock
|
||||
pytest-django
|
||||
pytest-cov
|
Reference in New Issue