From: Radek Czajka Date: Wed, 5 Oct 2011 14:31:18 +0000 (+0200) Subject: tests fixes X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/753e8bf1e2fe3ccc0a21166cc7da1d88c08bbb89 tests fixes --- diff --git a/apps/dvcs/tests/__init__.py b/apps/dvcs/tests/__init__.py index de77d991..1809a18e 100755 --- a/apps/dvcs/tests/__init__.py +++ b/apps/dvcs/tests/__init__.py @@ -4,7 +4,8 @@ from dvcs.models import Document class ADocument(Document): - pass + class Meta: + app_label = 'dvcs' class DocumentModelTests(TestCase): diff --git a/redakcja/settings/test.py b/redakcja/settings/test.py index f6e90803..1997c967 100644 --- a/redakcja/settings/test.py +++ b/redakcja/settings/test.py @@ -6,22 +6,30 @@ from redakcja.settings.common import * # ROOT_URLCONF = 'yourapp.settings.test.urls' -DATABASE_ENGINE = 'sqlite3' -DATABASE_NAME = ':memory:' +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. + '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 -CATALOGUE_REPO_PATH = tempfile.mkdtemp(prefix='wikirepo') +CATALOGUE_REPO_PATH = tempfile.mkdtemp(prefix='redakcja-repo') -INSTALLED_APPS += ('django_nose',) +INSTALLED_APPS += ('django_nose', 'dvcs.tests') -TEST_RUNNER = 'django_nose.run_tests' +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), '-d', - '--with-coverage', '--with-doctest', '--with-xunit', '--with-xcoverage',