Permalink
Browse files

Updated runtests.py for compatibility with Django 1.4.

  • Loading branch information...
1 parent 9e5d619 commit 954d4884bcbc00d93ce815b13c14e9f3a220864e @AndrewIngram committed Jun 12, 2011
Showing with 7 additions and 4 deletions.
  1. +7 −4 runtests.py
View
11 runtests.py
@@ -6,8 +6,11 @@
if not settings.configured:
settings.configure(
- DATABASE_ENGINE='django.db.backends.sqlite3',
- DATABASE_NAME=':memory:',
+ DATABASES={
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': ':memory:',
+ }},
INSTALLED_APPS=[
'django.contrib.contenttypes',
'django.contrib.sessions',
@@ -19,14 +22,14 @@
DEBUG=False,
)
-from django.test.simple import run_tests
+from django.test.simple import DjangoTestSuiteRunner
def runtests(*test_args):
if not test_args:
test_args = ['extra_views']
parent = dirname(abspath(__file__))
sys.path.insert(0, parent)
- failures = run_tests(test_args, verbosity=1, interactive='--no-input' not in sys.argv)
+ failures = DjangoTestSuiteRunner().run_tests(test_args, verbosity=1, interactive='--no-input' not in sys.argv)
sys.exit(failures)
if __name__ == '__main__':

0 comments on commit 954d488

Please sign in to comment.