def test_egg5(self):
        egg_name = '%s/brokenapp.egg' % self.egg_dir
        sys.path.append(egg_name)
        self.assertRaises(ImportError, load_app, 'broken_app')
        try:
            load_app('broken_app')
        except ImportError as e:
            # Make sure the message is indicating the actual
            # problem in the broken app.
            self.assertTrue("modelz" in e.args[0])
Loading an app from an egg that has an import error in its models module raises that error
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/tests/regressiontests/app_loading/tests.py/EggLoadingTest.test_egg5