diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-23 10:37:34 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-23 21:37:56 +0100 |
| commit | da16bb30ff238aa4d59b4186d92ef5429d8d0045 (patch) | |
| tree | dfda0b750aa0d3a71c4751edcb7b86f3517e2b3f /tests/utils_tests/test_module_loading.py | |
| parent | 5241763c81b6afe1c0327ff7eb0d75c643f24ce0 (diff) | |
Dropped AppCache._empty, _with_app and _without_app.
It's now easier to achieve the same effect with modify_settings or
override_settings.
Diffstat (limited to 'tests/utils_tests/test_module_loading.py')
| -rw-r--r-- | tests/utils_tests/test_module_loading.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/utils_tests/test_module_loading.py b/tests/utils_tests/test_module_loading.py index baaab36494..0bba98e8c2 100644 --- a/tests/utils_tests/test_module_loading.py +++ b/tests/utils_tests/test_module_loading.py @@ -5,9 +5,8 @@ import sys import unittest from zipimport import zipimporter -from django.apps import app_cache from django.core.exceptions import ImproperlyConfigured -from django.test import SimpleTestCase +from django.test import SimpleTestCase, modify_settings from django.utils import six from django.utils.module_loading import autodiscover_modules, import_by_path, module_has_submodule from django.utils._os import upath @@ -135,14 +134,9 @@ class ModuleImportTestCase(unittest.TestCase): 'Should have more than the calling frame in the traceback.') +@modify_settings(INSTALLED_APPS={'append': 'utils_tests.test_module'}) class AutodiscoverModulesTestCase(SimpleTestCase): - def setUp(self): - self._with_test_module = app_cache._begin_with_app('utils_tests.test_module') - - def tearDown(self): - app_cache._end_with_app(self._with_test_module) - def test_autodiscover_modules_found(self): autodiscover_modules('good_module') |
