I am using a simple unit test based test runner to test my Django application.
My application itself is configured to use a basic logger in settings.py using:
<
In my case I have a settings file settings/test.py created specifically for testing purposes, here's what it looks like:
from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'test_db'
}
}
PASSWORD_HASHERS = (
'django.contrib.auth.hashers.MD5PasswordHasher',
)
LOGGING = {}
I put an environment variable DJANGO_SETTINGS_MODULE=settings.test to /etc/environment.