Added a test for Apps.has_app.
This commit is contained in:
parent
d430f1d98b
commit
8779aa806e
|
@ -136,6 +136,12 @@ class AppsTests(TestCase):
|
||||||
with self.assertRaises(LookupError):
|
with self.assertRaises(LookupError):
|
||||||
apps.get_app_config('staticfiles', only_with_models_module=True)
|
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):
|
def test_models_py(self):
|
||||||
"""
|
"""
|
||||||
Tests that the models in the models.py file were loaded correctly.
|
Tests that the models in the models.py file were loaded correctly.
|
||||||
|
|
Loading…
Reference in New Issue