diff --git a/AUTHORS b/AUTHORS index 57f9df3efe..a930a0e9f2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -154,6 +154,7 @@ answer newbie questions, and generally made Django that much better: Michael Radziej ramiro Brian Ray + remco@diji.biz rhettg@gmail.com Oliver Rutherfurd Ivan Sagalaev (Maniac) diff --git a/django/test/simple.py b/django/test/simple.py index 88e6b49925..0cecc6b4fc 100644 --- a/django/test/simple.py +++ b/django/test/simple.py @@ -1,6 +1,5 @@ import unittest, doctest from django.conf import settings -from django.core import management from django.test.utils import setup_test_environment, teardown_test_environment from django.test.utils import create_test_db, destroy_test_db from django.test.testcases import OutputChecker, DocTestRunner @@ -78,7 +77,6 @@ def run_tests(module_list, verbosity=1, extra_tests=[]): old_name = settings.DATABASE_NAME create_test_db(verbosity) - management.syncdb(verbosity, interactive=False) unittest.TextTestRunner(verbosity=verbosity).run(suite) destroy_test_db(old_name, verbosity) diff --git a/django/test/utils.py b/django/test/utils.py index 039a6dd7a2..9939e36fa4 100644 --- a/django/test/utils.py +++ b/django/test/utils.py @@ -1,6 +1,7 @@ import sys, time from django.conf import settings from django.db import connection, transaction, backend +from django.core import management from django.dispatch import dispatcher from django.test import signals from django.template import Template @@ -84,6 +85,8 @@ def create_test_db(verbosity=1, autoclobber=False): connection.close() settings.DATABASE_NAME = TEST_DATABASE_NAME + management.syncdb(verbosity, interactive=False) + # Get a cursor (even though we don't need one yet). This has # the side effect of initializing the test database. cursor = connection.cursor()