Django

Code

Changeset 3133

Show
Ignore:
Timestamp:
06/16/06 13:58:45 (2 years ago)
Author:
jacob
Message:

Test harness actually now installs contrib apps so they can be used in tests.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/runtests.py

    r2996 r3133  
    2222 
    2323ALWAYS_INSTALLED_APPS = [ 
    24     'django.contrib.admin', 
     24    'django.contrib.contenttypes', 
    2525    'django.contrib.auth',  
    26     'django.contrib.comments', 
    27     'django.contrib.contenttypes', 
     26    'django.contrib.sites', 
    2827    'django.contrib.flatpages', 
    2928    'django.contrib.redirects', 
    3029    'django.contrib.sessions', 
    31     'django.contrib.sites', 
     30    'django.contrib.comments', 
     31    'django.contrib.admin', 
    3232] 
    3333 
     
    149149        # Initialize the test database. 
    150150        cursor = connection.cursor() 
     151         
     152        # Install the core always installed apps 
     153        for app in ALWAYS_INSTALLED_APPS: 
     154            self.output(1, "Installing contrib app %s" % app) 
     155            mod = __import__(app + ".models", '', '', ['']) 
     156            management.install(mod) 
    151157 
    152158        # Run the tests for each test model.