Skip to content

Failed

OmeroPy.test.integration.gatewaytest.test_wrapper.TestWrapper.testAllObjectsWrapped (from pytest)

Failing for the past 2 builds (Since #313 )
Took 12 sec.

Error Message

AssertionError: BlitzObjectWrapper should lazy-load the value
assert 'OMEXML' == 'Deltavision'
  
  - Deltavision
  + OMEXML

Stacktrace

self = <test.integration.gatewaytest.test_wrapper.TestWrapper object at 0x7f9b05502b50>
author_testimg = <_ImageWrapper id=5845>

    def testAllObjectsWrapped(self, author_testimg):
        """
        Blitz object wrapper should ensure that all values returned are also
        wrapped (or are primative values)
        """
        image = author_testimg
        pixels = image.getPrimaryPixels()
        instrument = image.getInstrument()
        assert isinstance(instrument, omero.gateway.BlitzObjectWrapper)
        assert not hasattr(image.getArchived(), 'val'), \
            "Shouldn't return rtype"
        assert not hasattr(image.getAcquisitionDate(), 'val'), \
            "Shouldn't return rtype"
        assert not hasattr(image.sizeOfPixels(), 'val'), \
            "Non 'get' methods shouldn't return rtype either"
        assert isinstance(
            image.getInstrument(), omero.gateway.InstrumentWrapper), \
            "Should return InstrumentWrapper"
        assert isinstance(pixels, omero.gateway.BlitzObjectWrapper), \
            "Should return a BlitzObjectWrapper"
    
        # 'get' methods should wrap model objects in BlitzObjectWrapper -
        # allowing lazy loading
        assert isinstance(
            image.getFormat(), omero.gateway.BlitzObjectWrapper), \
            "Should return a BlitzObjectWrapper"
        format = image.getFormat()
>       assert format.value == "Deltavision", \
            "BlitzObjectWrapper should lazy-load the value"
E       AssertionError: BlitzObjectWrapper should lazy-load the value
E       assert 'OMEXML' == 'Deltavision'
E         
E         - Deltavision
E         + OMEXML

test/integration/gatewaytest/test_wrapper.py:56: AssertionError