def test_unexpected_messages_are_logged(self):
        self.actor_ref.ask({'unhandled': 'message'})
        self.log_handler.wait_for_message('warning')
        with self.log_handler.lock:
            self.assertEqual(1, len(self.log_handler.messages['warning']))
            log_record = self.log_handler.messages['warning'][0]
        self.assertEqual(
            'Unexpected message received by %s' % self.actor_ref,
            log_record.getMessage().split(': ')[0])
dataset/ETHPy150Open jodal/pykka/tests/logging_test.py/ActorLoggingTest.test_unexpected_messages_are_logged/original