FreedomBox/plinth/tests/data/django_test_settings.py
Bob Girard 5cadd223d5 Add support for testing Django-dependent modules
- Add django-test-settings.py for Django settings
- Add runtests.py for setting up Django test environment
- Add Django test setup support to setup.py and coverage.py
- Add new test module test_kvstore.py
- Enable existing Django-dependent tests in test_context_processors.py and test_menu.py
2015-05-23 13:59:49 +05:30

29 lines
686 B
Python

# Django settings for test modules.
import os
TEST_DATA_DIR = os.path.dirname(os.path.abspath(__file__))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(TEST_DATA_DIR, 'plinth.sqlite3'),
}
}
DEFAULT_INDEX_TABLESPACE = ''
INSTALLED_APPS = (
'plinth',
)
# These are included here solely to suppress Django warnings
# during testing setup
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
ROOT_URLCONF = 'plinth.urls'
SECRET_KEY = 'django_tests_secret_key'