mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-15 09:51:21 +00:00
- 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
29 lines
686 B
Python
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'
|