'Tests for bug #11193 (errors inside middleware shouldn\'t leave
the initLock locked).'

@override_settings(MIDDLEWARE_CLASSES=42)
def test_lock_safety(self):

    handler = WSGIHandler()
    self.assertEqual(handler.initLock.locked(), False)
    with self.assertRaises(Exception):
        handler(None, None)
    self.assertEqual(handler.initLock.locked(), False)
