added setup.py test/ todo: write tests

This commit is contained in:
fivethreeo 2011-01-14 14:52:45 +01:00
parent 87e3182f79
commit 71490d422c
7 changed files with 67 additions and 0 deletions

View File

@ -16,6 +16,8 @@ setup(
'Programming Language :: Python',
'Framework :: Django',
],
install_requires = ['Django>=1.2.4'],
test_suite = 'simple_translation.test.run_tests.run_tests',
include_package_data=True,
zip_safe=False,
)

View File

View File

@ -0,0 +1,55 @@
import sys
def run_tests():
from django.conf import settings
settings.configure(
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'simple_translation.db'
}
},
TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.auth",
"django.core.context_processors.i18n",
"django.core.context_processors.debug",
"django.core.context_processors.request",
"django.core.context_processors.media",
'django.core.context_processors.csrf',
),
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'cms.middleware.multilingual.MultilingualURLMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.middleware.csrf.CsrfViewMiddleware'
),
ROOT_URLCONF = 'simple_translation.test.testapp.urls',
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.sites',
'simple_translation'
),
LANGUAGE_CODE = "en",
)
from django.test.utils import get_runner
failures = get_runner(settings)().run_tests(['simple_translation'])
sys.exit(failures)
if __name__ == '__main__':
run_tests()

View File

@ -0,0 +1,4 @@
from django.test.testcases import TestCase
class SimpleTranslationBaseTestCase(TestCase):
pass

View File

@ -0,0 +1,6 @@
from simple_translation.test.testcases import SimpleTranslationBaseTestCase
class SimpleTranslationTestCase(SimpleTranslationBaseTestCase):
def test_01_test_urls(self):
self.assertEquals(True, False)