mirror of
https://github.com/django/django.git
synced 2025-07-29 08:04:27 +00:00
Fixed #13335: Adjusted the r12950 fix to properly handle import errors resulting from nested calls to load_app.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12972 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d8910e95e0
commit
48dd5f13a3
10 changed files with 43 additions and 5 deletions
|
@ -957,7 +957,7 @@ class ManageMultipleSettings(AdminScriptTestCase):
|
|||
self.assertOutput(err, "Unknown command: 'noargs_command'")
|
||||
|
||||
|
||||
class ManageValidateImportErrorsReported(AdminScriptTestCase):
|
||||
class ManageValidate(AdminScriptTestCase):
|
||||
def tearDown(self):
|
||||
self.remove_settings('settings.py')
|
||||
|
||||
|
@ -976,7 +976,17 @@ class ManageValidateImportErrorsReported(AdminScriptTestCase):
|
|||
out, err = self.run_manage(args)
|
||||
self.assertNoOutput(out)
|
||||
self.assertOutput(err, 'ImportError')
|
||||
|
||||
|
||||
def test_complex_app(self):
|
||||
"manage.py validate does not raise an ImportError validating a complex app with nested calls to load_app"
|
||||
self.write_settings('settings.py',
|
||||
apps=['admin_scripts.complex_app', 'admin_scripts.simple_app'],
|
||||
sdict={'DEBUG': True})
|
||||
args = ['validate']
|
||||
out, err = self.run_manage(args)
|
||||
self.assertNoOutput(err)
|
||||
self.assertOutput(out, '0 errors found')
|
||||
|
||||
|
||||
##########################################################################
|
||||
# COMMAND PROCESSING TESTS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue