Skip to content

Failed

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

Failing for the past 4 builds (Since #64 )
Took 3.3 sec.

Error Message

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

Stacktrace

self = <test_tree.TestTree object at 0x7f22423c50a0>
userA = (<omero.clients.BaseClient object at 0x7f22bee35b80>, 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': ...': 7373, ...}] == [{'acqDate': ...ImageB', ...}]
E         
E         At index 0 diff: {'id': 7372, 'archived': None, 'name': 'ImageA', 'ownerId': 4586, 'permsCss': 'canEdit canAnnotate canLink canDelete canChgrp isOwned', 'date': '2024-05-19T05:10:03+01:00', 'acqDate': '2015-10-06T12:10:10+01:00'} != {'id': 7372, 'name': 'ImageA', 'ownerId': 4586, 'permsCss': 'canEdit canAnnotate canLink canDelete canChgrp isOwned', 'acqDate': '2015-10-06T12:10:10+01:00', 'date': '2024-05-19T05:10:03+01:00'}
E         
E         Full diff:
E           [
E               {
E                   'acqDate': '2015-10-06T12:10:10+01:00',
E         +         'archived': None,
E                   'date': '2024-05-19T05:10:03+01:00',
E                   'id': 7372,
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-19T05:10:03+01:00',
E                   'id': 7373,
E                   'name': 'ImageB',
E                   'ownerId': 4586,
E                   'permsCss': 'canEdit canAnnotate canLink canDelete canChgrp isOwned',
E               },
E           ]

test/integration/test_tree.py:1868: AssertionError