def test_deferredOnConnectionFailure(self):

        class TestException(Exception):
            pass

        self.factory.buildProtocol(None)
        self.factory.clientConnectionFailed(self, TestException())
        self.assertFailure(self.factory.deferred, TestException)
        return self.factory.deferred
Test the factory's deferred on connection faulure.
dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_client.py/DeferredClientFactoryTest.test_deferredOnConnectionFailure