From 48dd5f13a351048d40803cbb95e60ed775d980cd Mon Sep 17 00:00:00 2001 From: Karen Tracey Date: Wed, 14 Apr 2010 19:10:27 +0000 Subject: 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 --- tests/regressiontests/admin_scripts/tests.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tests/regressiontests/admin_scripts/tests.py') diff --git a/tests/regressiontests/admin_scripts/tests.py b/tests/regressiontests/admin_scripts/tests.py index 62a1b49637..77ed8d25cc 100644 --- a/tests/regressiontests/admin_scripts/tests.py +++ b/tests/regressiontests/admin_scripts/tests.py @@ -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 -- cgit v1.3