Custom test runner for quicker tests.

This commit is contained in:
Pēteris Caune 2016-01-02 23:04:03 +02:00
parent b9ae8d464c
commit 4e12193d8c
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,12 @@
from django.conf import settings
from django.test.runner import DiscoverRunner
class CustomRunner(DiscoverRunner):
def __init__(self, *args, **kwargs):
# For speed:
settings.PASSWORD_HASHERS = \
('django.contrib.auth.hashers.MD5PasswordHasher', )
super(CustomRunner, self).__init__(*args, **kwargs)

View File

@ -71,6 +71,8 @@ TEMPLATES = [
]
WSGI_APPLICATION = 'hc.wsgi.application'
TEST_RUNNER = 'hc.api.tests.CustomRunner'
# Default database engine is SQLite. So one can just check out code,
# install requirements.txt and do manage.py runserver and it works