'L{HTTP11ClientProtocol.abort} will tell the transport to close its
connection when it is invoked, and returns a C{Deferred} that fires
when the connection is lost.'

def test_abortClosesConnection(self):

    transport = StringTransport()
    protocol = HTTP11ClientProtocol()
    protocol.makeConnection(transport)
    r1 = []
    r2 = []
    protocol.abort().addCallback(r1.append)
    protocol.abort().addCallback(r2.append)
    self.assertEqual((r1, r2), ([], []))
    self.assertTrue(transport.disconnecting)
    protocol.connectionLost(Failure(ConnectionDone()))
    self.assertEqual(r1, [None])
    self.assertEqual(r2, [None])
