summaryrefslogtreecommitdiff
path: root/tests/appcachetests/runtests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/appcachetests/runtests.py')
-rw-r--r--tests/appcachetests/runtests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/appcachetests/runtests.py b/tests/appcachetests/runtests.py
index b9a34c4e4c..8b62e7e0dc 100644
--- a/tests/appcachetests/runtests.py
+++ b/tests/appcachetests/runtests.py
@@ -42,6 +42,7 @@ class AppCacheTestCase(unittest.TestCase):
# because thread.RLock is un(deep)copyable
cache.app_models = SortedDict()
cache.app_instances = []
+ cache.installed_apps = []
cache.loaded = False
cache.handled = {}
@@ -272,6 +273,15 @@ class LoadAppTests(AppCacheTestCase):
"""
self.assertRaises(ImportError, cache.load_app, 'garageland')
+ def test_installed_apps(self):
+ """
+ Test that the installed_apps attribute is populated correctly
+ """
+ settings.INSTALLED_APPS = ('model_app', 'nomodel_app.MyApp',)
+ # populate cache
+ cache.get_app_errors()
+ self.assertEqual(cache.installed_apps, ['model_app', 'nomodel_app',])
+
class RegisterModelsTests(AppCacheTestCase):
"""Tests for the register_models function"""