diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-23 00:10:53 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-23 20:15:08 +0100 |
| commit | 5891990b6e6f6e90a873ceb199b321177a90c9eb (patch) | |
| tree | 437f9c221dd28d888913e1d55dabc66a2a9d68a5 /tests/app_loading | |
| parent | 8cff95e937a3a10e577082bfbcd75ed82ec0223b (diff) | |
Refactored INSTALLED_APPS overrides.
* Introduced [un]set_installed_apps to handle changes to the
INSTALLED_APPS setting.
* Refactored [un]set_available_apps to share its implementation
with [un]set_installed_apps.
* Implemented a receiver to clear some app-related caches.
* Removed test_missing_app as it is basically impossible to reproduce
this situation with public methods of the new app cache.
Diffstat (limited to 'tests/app_loading')
| -rw-r--r-- | tests/app_loading/tests.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/tests/app_loading/tests.py b/tests/app_loading/tests.py index 0692597a5b..164e363161 100644 --- a/tests/app_loading/tests.py +++ b/tests/app_loading/tests.py @@ -3,11 +3,8 @@ from __future__ import unicode_literals import os import sys from unittest import TestCase -import warnings from django.apps import app_cache -from django.apps.cache import AppCache -from django.test.utils import override_settings from django.utils._os import upath from django.utils import six @@ -69,23 +66,6 @@ class EggLoadingTest(TestCase): with app_cache._with_app('broken_app'): app_cache.get_app_config('omelet.app_no_models').models_module - def test_missing_app(self): - """ - Test that repeated app loading doesn't succeed in case there is an - error. Refs #17667. - """ - app_cache = AppCache() - # Pretend we're the master app cache to test the population process. - app_cache._apps_loaded = False - app_cache._models_loaded = False - with warnings.catch_warnings(): - warnings.filterwarnings("ignore", "Overriding setting INSTALLED_APPS") - with override_settings(INSTALLED_APPS=['notexists']): - with self.assertRaises(ImportError): - app_cache.get_model('notexists', 'nomodel') - with self.assertRaises(ImportError): - app_cache.get_model('notexists', 'nomodel') - class GetModelsTest(TestCase): def setUp(self): |
