summaryrefslogtreecommitdiff
path: root/tests/proxy_models
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-12-24 10:08:04 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-12-24 10:56:50 +0100
commit82a35e24d4de58e637661591b14d9b4658bcab11 (patch)
treee0dabcce9d37651b59f478907778bda547f9cf76 /tests/proxy_models
parent2ec8e3443bc9345d986710244e05a3cce56c8da1 (diff)
downloaddjango-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/proxy_models')
-rw-r--r--tests/proxy_models/tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/proxy_models/tests.py b/tests/proxy_models/tests.py
index 346924e320..4a3d6e5e5a 100644
--- a/tests/proxy_models/tests.py
+++ b/tests/proxy_models/tests.py
@@ -175,7 +175,7 @@ class ProxyModelTests(TestCase):
finally:
app_cache.app_configs['proxy_models'].models = _old_models
app_cache.all_models['proxy_models'] = _old_models
- app_cache._get_models_cache = {}
+ app_cache.get_models.cache_clear()
def test_myperson_manager(self):
Person.objects.create(name="fred")