diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-18 14:49:29 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-22 11:39:17 +0100 |
| commit | 86804ab063cb9666b69638372abfe4174a2472b2 (patch) | |
| tree | 8335e3dcf7781f0065457491e368d2981e80d36b /tests | |
| parent | 2b56d6910269ace19e3007d2b4a3445f7886314f (diff) | |
Terminated AppCache._populate() with extreme prejudice.
It was called _populate() before I renamed it to populate(). Since it
has been superseded by populate_models() there's no reason to keep it.
Removed the can_postpone argument of load_app() as it was only used by
populate(). It's a private API and there's no replacement. Simplified
load_app() accordingly. Then new version behaves exactly like the old
one even though it's much shorter.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/app_loading/tests.py | 5 | ||||
| -rwxr-xr-x | tests/runtests.py | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/app_loading/tests.py b/tests/app_loading/tests.py index e282306ec0..45f6cd6c31 100644 --- a/tests/app_loading/tests.py +++ b/tests/app_loading/tests.py @@ -77,8 +77,9 @@ class EggLoadingTest(TestCase): error. Refs #17667. """ app_cache = AppCache() - # Pretend we're the master app cache to test populate(). - app_cache.master = True + # Pretend we're the master app cache to test the population process. + app_cache._apps_loaded = False + app_cache._models_loaded = False with override_settings(INSTALLED_APPS=('notexists',)): with self.assertRaises(ImportError): app_cache.get_model('notexists', 'nomodel') diff --git a/tests/runtests.py b/tests/runtests.py index badbd6fbec..77cf005267 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -128,7 +128,7 @@ def setup(verbosity, test_labels): # Load all the ALWAYS_INSTALLED_APPS. with warnings.catch_warnings(): warnings.filterwarnings('ignore', 'django.contrib.comments is deprecated and will be removed before Django 1.8.', DeprecationWarning) - app_cache.populate() + app_cache.populate_models() # Load all the test model apps. test_modules = get_test_modules() |
