Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Changed model test framework to use meta.get_app() instead of a manua…

…l import

git-svn-id: http://code.djangoproject.com/svn/django/trunk@342 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a47794c82488c1cf307ee92aff0e5607e03ae0fc 1 parent f6e75ab
Adrian Holovaty authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  tests/runtests.py
4  tests/runtests.py
@@ -46,7 +46,7 @@ def output(self, required_level, message):
46 46
     def run_tests(self):
47 47
         from django.conf import settings
48 48
         from django.core.db import db
49  
-        from django.core import management
  49
+        from django.core import management, meta
50 50
 
51 51
         # Manually set INSTALLED_APPS to point to the test app.
52 52
         settings.INSTALLED_APPS = (APP_NAME,)
@@ -89,7 +89,7 @@ def run_tests(self):
89 89
         for model_name in test_models:
90 90
             self.output(1, "%s model: Importing" % model_name)
91 91
             try:
92  
-                mod = __import__(APP_NAME + '.models.' + model_name, '', '', [''])
  92
+                mod = meta.get_app(model_name)
93 93
             except Exception, e:
94 94
                 log_error(model_name, "Error while importing", ''.join(traceback.format_exception(*sys.exc_info())[1:]))
95 95
                 continue

0 notes on commit a47794c

Please sign in to comment.
Something went wrong with that request. Please try again.