twisted/twisted — pull request #1 by adiroiban (2013-05-22 11:40:06+00:00)
Title: [#6521] StringTransportWithDisconnection should use failure.

Problem description
===================

The current implementation of t.test.proto_helpers.StringTransportWithDisconnection.connectionLost is calling self.protocol.connectionLost() with an Exception and not a Failure.

Changes description
===================

I have fixed the implementation and also updated the failing tests.

There is still one un-caught exceptions but I don't know how to track it

```
$ trial twisted.test

....

[ERROR]
Traceback (most recent call last):
Failure: twisted.internet.error.ConnectionDone: Connection was closed cleanly: Bye..

twisted.test.test_pb.BrokerTestCase.test_cache
-------------------------------------------------------------------------------
Ran 2074 tests in 30.939s

FAILED (skips=58, expectedFailures=4, errors=1, successes=2011)

$ trial twisted.test.test_pb

...

test_sync ... [OK]

-------------------------------------------------------------------------------
Ran 45 tests in 0.527s

PASSED (successes=45)

```