Skip to content

Failed

OmeroWeb.test.integration.test_tree.TestTree.test_marshal_images_dataset_date (from pytest)

Failing for the past 3 builds (Since #64 )
Took 3.2 sec.

Error Message

AssertionError: assert [{'acqDate': ...': 7372, ...}] == [{'acqDate': ...ImageB', ...}]
  
  At index 0 diff: {'id': 7373, 'archived': None, 'name': 'ImageA', 'ownerId': 4586, 'permsCss': 'canEdit canAnnotate canLink canDelete canChgrp isOwned', 'date': '2024-05-18T05:03:20+01:00', 'acqDate': '2015-10-06T12:10:10+01:00'} != {'id': 7373, 'name': 'ImageA', 'ownerId': 4586, 'permsCss': 'canEdit canAnnotate canLink canDelete canChgrp isOwned', 'acqDate': '2015-10-06T12:10:10+01:00', 'date': '2024-05-18T05:03:20+01:00'}
  
  Full diff:
    [
        {
            'acqDate': '2015-10-06T12:10:10+01:00',
  +         'archived': None,
            'date': '2024-05-18T05:03:20+01:00',
            'id': 7373,
            'name': 'ImageA',
            'ownerId': 4586,
            'permsCss': 'canEdit canAnnotate canLink canDelete canChgrp isOwned',
        },
        {
            'acqDate': '2015-10-06T12:10:10+01:00',
  +         'archived': None,
            'date': '2024-05-18T05:03:20+01:00',
            'id': 7372,
            'name': 'ImageB',
            'ownerId': 4586,
            'permsCss': 'canEdit canAnnotate canLink canDelete canChgrp isOwned',
        },
    ]

Stacktrace

self = <test_tree.TestTree object at 0x7fbf83b580a0>
userA = (<omero.clients.BaseClient object at 0x7fbffdc191c0>, object #0 (::omero::model::Experimenter)
{
    _id = object #1 (...nnotationLinksSeq = 
    {
    }
    _annotationLinksLoaded = False
    _annotationLinksCountPerOwner = 
    {
    }
})
project_hierarchy_userA_groupA = [object #0 (::omero::model::Project)
{
    _id = object #1 (::omero::RLong)
    {
        _val = 1067
    }
    _detai...{
    }
    _name = object #127 (::omero::RString)
    {
        _val = ImageB
    }
    _description = <object #14>
}]

    def test_marshal_images_dataset_date(self, userA,
                                         project_hierarchy_userA_groupA):
        """
        Test marshalling dates for images in datasetA
        Images have creation Date and Acquisition Dates set
        """
        conn = get_connection(userA)
        dataset = project_hierarchy_userA_groupA[2]
        images = project_hierarchy_userA_groupA[4:6]
        utcAcq = 1444129810716
        for i in images:
            # get Creation date and set Acquisition Date.
            utcCreate = i.details.creationEvent._time.val
            i.setAcquisitionDate(rtime(utcAcq))
        images = conn.getUpdateService().saveAndReturnArray(images)
        # All images created at same time
        creDate = expected_date(utcCreate)
        acqDate = expected_date(utcAcq)
        extraValues = {'acqDate': acqDate,
                       'date': creDate}
        expected = expected_images(userA, images,
                                   extraValues=extraValues)
        marshaled = marshal_images(conn=conn,
                                   dataset_id=dataset.id.val,
                                   date=True)
>       assert marshaled == expected
E       AssertionError: assert [{'acqDate': ...': 7372, ...}] == [{'acqDate': ...ImageB', ...}]
E         
E         At index 0 diff: {'id': 7373, 'archived': None, 'name': 'ImageA', 'ownerId': 4586, 'permsCss': 'canEdit canAnnotate canLink canDelete canChgrp isOwned', 'date': '2024-05-18T05:03:20+01:00', 'acqDate': '2015-10-06T12:10:10+01:00'} != {'id': 7373, 'name': 'ImageA', 'ownerId': 4586, 'permsCss': 'canEdit canAnnotate canLink canDelete canChgrp isOwned', 'acqDate': '2015-10-06T12:10:10+01:00', 'date': '2024-05-18T05:03:20+01:00'}
E         
E         Full diff:
E           [
E               {
E                   'acqDate': '2015-10-06T12:10:10+01:00',
E         +         'archived': None,
E                   'date': '2024-05-18T05:03:20+01:00',
E                   'id': 7373,
E                   'name': 'ImageA',
E                   'ownerId': 4586,
E                   'permsCss': 'canEdit canAnnotate canLink canDelete canChgrp isOwned',
E               },
E               {
E                   'acqDate': '2015-10-06T12:10:10+01:00',
E         +         'archived': None,
E                   'date': '2024-05-18T05:03:20+01:00',
E                   'id': 7372,
E                   'name': 'ImageB',
E                   'ownerId': 4586,
E                   'permsCss': 'canEdit canAnnotate canLink canDelete canChgrp isOwned',
E               },
E           ]

test/integration/test_tree.py:1868: AssertionError