Fixed #26616 -- Improved error message when AppConfig.name is invalid.

This commit is contained in:
inondle 2016-06-01 13:08:59 -07:00 committed by Tim Graham
parent 779829662d
commit 080dd74e01
2 changed files with 10 additions and 2 deletions

View file

@ -78,7 +78,8 @@ class AppsTests(SimpleTestCase):
with self.assertRaises(ImportError):
with self.settings(INSTALLED_APPS=['there is no such app']):
pass
with self.assertRaises(ImportError):
msg = "Cannot import 'there is no such app'. Check that 'apps.apps.NoSuchApp.name' is correct."
with self.assertRaisesMessage(ImproperlyConfigured, msg):
with self.settings(INSTALLED_APPS=['apps.apps.NoSuchApp']):
pass