diff options
author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-24 10:08:04 +0100 |
---|---|---|
committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-24 10:56:50 +0100 |
commit | 82a35e24d4de58e637661591b14d9b4658bcab11 (patch) | |
tree | e0dabcce9d37651b59f478907778bda547f9cf76 /tests/app_loading | |
parent | 2ec8e3443bc9345d986710244e05a3cce56c8da1 (diff) | |
download | django-82a35e24d4de58e637661591b14d9b4658bcab11.tar.gz |
Replaced ad-hoc caching of get_models with lru_cache.
Invalidate properly the cache whenever all_models or app_configs change.
This fixes some isolation issues in the test suite.
Diffstat (limited to 'tests/app_loading')
-rw-r--r-- | tests/app_loading/tests.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/app_loading/tests.py b/tests/app_loading/tests.py index a9dc70f4b1..291877108f 100644 --- a/tests/app_loading/tests.py +++ b/tests/app_loading/tests.py @@ -21,7 +21,7 @@ class EggLoadingTest(TestCase): def tearDown(self): app_cache.all_models['app_loading'] = self._old_models - app_cache._get_models_cache = {} + app_cache.get_models.cache_clear() sys.path = self.old_path |