Made it possible to change an application's label in its configuration.

Fixed #21683.
This commit is contained in:
Aymeric Augustin 2013-12-31 16:23:42 +01:00
parent 5dfec4e23b
commit c40209dcc0
8 changed files with 83 additions and 31 deletions

View file

@ -111,6 +111,10 @@ class AppsTests(TestCase):
self.assertTrue(apps.has_app('django.contrib.staticfiles'))
self.assertFalse(apps.has_app('django.contrib.webdesign'))
@override_settings(INSTALLED_APPS=['apps.apps.RelabeledAppsConfig'])
def test_relabeling(self):
self.assertEqual(apps.get_app_config('relabeled').name, 'apps')
def test_models_py(self):
"""
Tests that the models in the models.py file were loaded correctly.