Commit 10566a15 authored by Martin Mahner's avatar Martin Mahner Committed by Stéphane Angel

Migrated test settings and runner to Django >= 1.3.

parent 65b91e12
#!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='sqlite3',
INSTALLED_APPS=[
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
},
INSTALLED_APPS = [
'tests.testapp',
]
)
from django.test.simple import run_tests
from django.test.simple import DjangoTestSuiteRunner
def runtests(*test_args):
if not test_args:
test_args = ['testapp']
parent = dirname(abspath(__file__))
sys.path.insert(0, parent)
failures = run_tests(test_args, verbosity=1, interactive=True)
runner = DjangoTestSuiteRunner(verbosity=1, interactive=True)
failures = runner.run_tests(test_args)
sys.exit(failures)
......
DEBUG = True
DATABASE_ENGINE = 'sqlite3'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
}
INSTALLED_APPS = [
'tests.testapp',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment