'Test preserving the original traceback on an ImportError.'

def test_import_error_traceback(self):

    try:
        import_by_path('test_module.bad_module.content')
    except ImproperlyConfigured:
        traceback = sys.exc_info()[2]
    self.assertIsNotNone(traceback.tb_next.tb_next, 'Should    have    more    than    the    calling    frame    in    the    traceback.')
