X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/1fbf854ce423d2d56723ff10608267403f4916b0..7b63c935ede34464745fd7b2f7ace69ac8254a43:/redakcja/settings/test.py diff --git a/redakcja/settings/test.py b/redakcja/settings/test.py index 118c7ffb..832e2c0e 100644 --- a/redakcja/settings/test.py +++ b/redakcja/settings/test.py @@ -1,28 +1,45 @@ +# -*- coding: utf-8 -*- +# +# This file is part of MIL/PEER, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# # # Nose tests # from redakcja.settings.common import * +import tempfile # ROOT_URLCONF = 'yourapp.settings.test.urls' -DATABASE_ENGINE = 'sqlite3' -DATABASE_NAME = ':memory:' +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': '', # Or path to database file if using sqlite3. + 'USER': '', # Not used with sqlite3. + 'PASSWORD': '', # Not used with sqlite3. + 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. + 'PORT': '', # Set to empty string for default. Not used with sqlite3. + } +} -import tempfile -WIKI_REPOSITORY_PATH = tempfile.mkdtemp(prefix='wikirepo') +CATALOGUE_REPO_PATH = tempfile.mkdtemp(prefix='redakcja-repo') +MEDIA_ROOT = tempfile.mkdtemp(prefix='media-root') +USE_CELERY = False -INSTALLED_APPS += ('django_nose',) +INSTALLED_APPS += ('django_nose', 'dvcs.tests') -TEST_RUNNER = 'django_nose.run_tests' -TEST_MODULES = ('wiki', 'toolbar', 'vstorage') +TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' +TEST_MODULES = ('catalogue', 'dvcs.tests', 'wiki', 'toolbar') +COVER_APPS = ('catalogue', 'dvcs', 'wiki', 'toolbar') NOSE_ARGS = ( '--tests=' + ','.join(TEST_MODULES), - '--cover-package=' + ','.join(TEST_MODULES), + '--cover-package=' + ','.join(COVER_APPS), '-d', - '--with-coverage', '--with-doctest', '--with-xunit', '--with-xcoverage', ) + +SECRET_KEY = "not-so-secret"