def emit(self, record):
    message = record.getMessage()
    if record.exc_info:
      message += '\n' + ''.join(traceback.format_exception(
          *record.exc_info))
    message = message.decode('utf8', 'replace')

    log_record = LogRecord(
        record.levelno, record.name, os.path.basename(record.pathname),
        record.lineno, int(record.created * 1000), message
    )
    self._test_record.log_records.append(log_record)
Test that a page can be copied via the admin
dataset/ETHPy150Open google/openhtf/openhtf/util/logs.py/RecordHandler.emit--crossover with--dataset/ETHPy150Open divio/django-cms/cms/tests/test_page.py/PagesTestCase.test_copy_page