'The connection to the web server is closed when the request is done.'

def test_closeConnectionAfterRequest(self):

    d = self.proxy().callRemote('echo', '')
    def responseDone(ignored):
        [factory] = self.factories
        self.assertFalse(factory.transport.connected)
        self.assertTrue(factory.transport.disconnected)
    return d.addCallback(responseDone)
