def test_badStatusErrbackSafety(self):
        d = self.queryFactory.deferred
        # The failure mode is that this callback raises an AlreadyCalled
        # error. We have to add it now so that it gets called synchronously
        # and triggers the race condition.
        d.addErrback(self.queryFactory.clientConnectionLost, self.reason)
        self.queryFactory.badStatus('status', 'message')
        return d
We can safely call L{_QueryFactory.clientConnectionLost} as an errback
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/test/test_xmlrpc.py/TestQueryFactoryParseResponse.test_badStatusErrbackSafety