def METHOD_NAME(self):
    job_id = uuid.uuid4()
    now = timezone.now()
    messages = [
        {
            'level': 'INFO',
            'message': 'Task started',
            'time': 1554381159.9411337
        }
    ]
    lint_records = [
        {
            'code': 'TEST0001',
            'type': 'test',
            'message': 'Test lint record',
            'severity': 4,
            'score_type': 'test'
        }
    ]
    pulp_task = pulp_models.Task(
        pk=24,
        job_id=job_id,
        state=pulp_const.TASK_STATES.RUNNING,
        started_at=now,
        finished_at=None,
    )
    namespace = models.Namespace(
        id=22,
        name='testnamespace',
    )
    instance = models.CollectionImport(
        id=42,
        pulp_task=pulp_task,
        namespace=namespace,
        name='testcollection',
        version='1.2.3',
        messages=messages,
        lint_records=lint_records
    )
    # NOTE: request hostname used for serializing urls
    request = APIRequestFactory().post('http://testserver/')
    serializer = serializers.CollectionImportSerializer(
        instance, context={'request': request})
    assert serializer.data == {
        'id': 42,
        'job_id': str(job_id),
        'state': 'running',
        'started_at': timezone.localtime(now).isoformat(),
        'finished_at': None,
        'error': None,
        'namespace': {
            'id': 22,
            'href': 'http://testserver/api/v1/namespaces/22/',
            'name': 'testnamespace',
        },
        'name': 'testcollection',
        'version': '1.2.3',
        'imported_version': None,
        'lint_records': [
            {
                'code': 'TEST0001',
                'type': 'test',
                'message': 'Test lint record',
                'severity': 4,
                'score_type': 'test'
            }
        ],
        'messages': [
            OrderedDict([
                ('level', 'INFO'),
                ('message', 'Task started'),
                ('time', '2019-04-04T08:32:39.941134-04:00')
            ]),
        ]
    }