From 86804ab063cb9666b69638372abfe4174a2472b2 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Wed, 18 Dec 2013 14:49:29 +0100 Subject: 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. --- tests/app_loading/tests.py | 5 +++-- tests/runtests.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'tests') 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() -- cgit v1.3