Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Test harness actually now installs contrib apps so they can be used i…

…n tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3133 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 174e334d929abf5669e8256bfa12cf61be51fc51 1 parent cc56d65
Jacob Kaplan-Moss jacobian authored
Showing with 10 additions and 4 deletions.
  1. +10 −4 tests/runtests.py
14 tests/runtests.py
View
@@ -21,14 +21,14 @@ def log_error(model_name, title, description):
MODEL_TEST_DIR = os.path.join(os.path.dirname(__file__), MODEL_TESTS_DIR_NAME)
ALWAYS_INSTALLED_APPS = [
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.comments',
'django.contrib.contenttypes',
+ 'django.contrib.auth',
+ 'django.contrib.sites',
'django.contrib.flatpages',
'django.contrib.redirects',
'django.contrib.sessions',
- 'django.contrib.sites',
+ 'django.contrib.comments',
+ 'django.contrib.admin',
]
def get_test_models():
@@ -148,6 +148,12 @@ def run_tests(self):
# Initialize the test database.
cursor = connection.cursor()
+
+ # Install the core always installed apps
+ for app in ALWAYS_INSTALLED_APPS:
+ self.output(1, "Installing contrib app %s" % app)
+ mod = __import__(app + ".models", '', '', [''])
+ management.install(mod)
# Run the tests for each test model.
self.output(1, "Running app tests")
Please sign in to comment.
Something went wrong with that request. Please try again.