Stack Trace
self = <test_marshal.TestImgDetail object at 0x7f47410485d0>
def test_pyramidal_image(self):
"""
Marshalling of non-SPW multi-resolution RGB image
"""
user_name = "%s %s" % (self.user.firstName.val, self.user.lastName.val)
# Import image with metadata and get ImageID
images = self.import_fake_file(
client=self.client, sizeX=20000, sizeY=20000, sizeC=3, rgb=3,
resolutions=5)
iid = images[0].id.val
json_url = reverse('webgateway_imageData_json', args=[iid])
data = {}
img_data = get_json(self.django_client, json_url, data,
status_code=200)
# Not a big image - tiles should be False with no other tiles metadata
assert img_data['tiles'] is True
assert img_data['levels'] == 5
assert 'tile_size' in img_data
assert img_data['zoomLevelScaling'] == {
"0": 1,
"1": 0.5,
"2": 0.25,
"3": 0.125,
"4": 0.0625
}
assert img_data['resolutions'] == {
"0": {
"sizeX": 20000,
"sizeY": 20000
},
"1": {
"sizeX": 10000,
"sizeY": 10000
},
"2": {
"sizeX": 5000,
"sizeY": 5000
},
"3": {
"sizeX": 2500,
"sizeY": 2500
},
"4": {
"sizeX": 1250,
"sizeY": 1250
}
}
# Channels metadata
assert len(img_data['channels']) == 3
assert img_data['channels'][0] == {
'color': "FF0000",
'active': True,
'window': {
'min': 0,
'max': 255,
'start': 0,
'end': 255
},
'family': 'linear',
'coefficient': 1.0,
'reverseIntensity': False,
'inverted': False,
'emissionWave': None,
'label': "0"
}
assert img_data['channels'][1] == {
'color': "00FF00",
'active': True,
'window': {
'min': 0,
'max': 255,
'start': 0,
'end': 255
},
'family': 'linear',
'coefficient': 1.0,
'reverseIntensity': False,
'inverted': False,
'emissionWave': None,
'label': "1"
}
assert img_data['channels'][2] == {
'color': "0000FF",
'active': True,
'window': {
'min': 0,
'max': 255,
'start': 0,
'end': 255
},
'family': 'linear',
'coefficient': 1.0,
'reverseIntensity': False,
'inverted': False,
'emissionWave': None,
'label': "2"
}
assert img_data['pixel_range'] == [0, 255]
> assert img_data['rdefs'] == {
'defaultT': 0,
'model': "color",
'invertAxis': False,
'projection': "normal",
'defaultZ': 2
}
E AssertionError: assert {'defaultT': ... 'color', ...} == {'defaultT': ... 'color', ...}
E
E Omitting 4 identical items, use -vv to show
E Differing items:
E {'defaultZ': 0} != {'defaultZ': 2}
E
E Full diff:
E {
E 'defaultT': 0,
E - 'defaultZ': 2,
E ? ^
E + 'defaultZ': 0,
E ? ^
E 'invertAxis': False,
E 'model': 'color',
E 'projection': 'normal',
E }
test/integration/test_marshal.py:236: AssertionError