'L{LocalWorker.connectionLost} closes the log streams.'

def test_connectionLost(self):

    class FakeStream(object, ):
        callNumber = 0
        def close(self):
            self.callNumber += 1
    transport = FakeTransport()
    localWorker = LocalWorker(FakeAMProtocol(), '.', 'test.log')
    localWorker.makeConnection(transport)
    localWorker._outLog = FakeStream()
    localWorker._errLog = FakeStream()
    localWorker.connectionLost(None)
    self.assertEqual(localWorker._outLog.callNumber, 1)
    self.assertEqual(localWorker._errLog.callNumber, 1)
