'Getting a complete output line generates a log message.'

def test_outputReceivedCompleteLine(self):

    events = []
    self.addCleanup(log.removeObserver, events.append)
    log.addObserver(events.append)
    self.pm.addProcess('foo', ['foo'])
    self.pm.startService()
    self.reactor.advance(0)
    self.assertIn('foo', self.pm.protocols)
    self.reactor.advance(self.pm.threshold)
    self.pm.protocols['foo'].outReceived('hello    world!\n')
    self.assertEquals(len(events), 1)
    message = events[0]['message']
    self.assertEquals(message, tuple([u'[foo]    hello    world!']))
