diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-26 20:04:06 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-26 20:39:28 +0100 |
| commit | 8779aa806e6b5442e60c111f9d5d6874a026e001 (patch) | |
| tree | 9f2ca4f1b8107f0e7d6b517d526c7afec36df169 | |
| parent | d430f1d98b564543d1c90d067efdf1ee6851d8d3 (diff) | |
Added a test for Apps.has_app.
| -rw-r--r-- | tests/apps/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/apps/tests.py b/tests/apps/tests.py index c743ba04a3..a516b6e662 100644 --- a/tests/apps/tests.py +++ b/tests/apps/tests.py @@ -136,6 +136,12 @@ class AppsTests(TestCase): with self.assertRaises(LookupError): apps.get_app_config('staticfiles', only_with_models_module=True) + @override_settings(INSTALLED_APPS=SOME_INSTALLED_APPS) + def test_has_app(self): + self.assertTrue(apps.has_app('django.contrib.admin')) + self.assertTrue(apps.has_app('django.contrib.staticfiles')) + self.assertFalse(apps.has_app('django.contrib.webdesign')) + def test_models_py(self): """ Tests that the models in the models.py file were loaded correctly. |
