'Return the log messages stored as Broks into the collector.
This also tests whether all objects collected by the collector
are log entries.'

def _get_brok_log_messages(self, collector):

    for obj in collector.list:
        self.assertIsInstance(obj, Brok)
        self.assertEqual(obj.type, 'log')
        data = cPickle.loads(obj.data)
        self.assertEqual(data.keys(), ['log'])
        (yield data['log'])
