mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
- Add module level comments. - Add comments to reflect docstring styling. - Since most tests can no longer be run directly, remove __main__ invocation uniformly from all the tests. - Remove unnecessary test settings and let them take default values. - Add license header to test settings module. - Fix a minor issue actions test tear down. - Improve key/value store tests.
48 lines
1.3 KiB
Python
48 lines
1.3 KiB
Python
#
|
|
# This file is part of Plinth.
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
# License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
|
|
"""
|
|
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'),
|
|
}
|
|
}
|
|
|
|
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'
|