diff options
author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-28 14:24:14 +0100 |
---|---|---|
committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-28 20:42:58 +0100 |
commit | 81354b82bf647fd100e836dae2639e9c8d76c5eb (patch) | |
tree | f62ee7baa18cbf704286926fd319545665c30859 /tests/app_loading | |
parent | bbdf01e00aed1e86f6aaeba81065be21af35d415 (diff) | |
download | django-81354b82bf647fd100e836dae2639e9c8d76c5eb.tar.gz |
Stopped calling apps.get_model with only_installed=False.
ContentTypes are only created for installed applications, and I could
make a case for not returning a model that isn't installed any more.
The check for stale ContentTypes in update_contenttypes doesn't use
model_class.
ModelSignal actually needs get_registered_model since the lookup happens
at import time. I took this opportunity to perform a small refactoring.
Diffstat (limited to 'tests/app_loading')
-rw-r--r-- | tests/app_loading/tests.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/app_loading/tests.py b/tests/app_loading/tests.py index 19a1d03d74..d61205330a 100644 --- a/tests/app_loading/tests.py +++ b/tests/app_loading/tests.py @@ -75,12 +75,6 @@ class GetModelsTest(TestCase): self.assertEqual( apps.get_model("not_installed", "NotInstalledModel"), None) - def test_get_model_with_not_installed(self): - self.assertEqual( - apps.get_model( - "not_installed", "NotInstalledModel", only_installed=False), - self.not_installed_module.NotInstalledModel) - def test_get_models_only_returns_installed_models(self): self.assertNotIn( "NotInstalledModel", |