Ejemplo n.º 1
0
 def testEmptyItem(self):
     a = MapAnnotationI()
     a.setMapValue([NV('Name1', 'Value1'), NV('Name2', 'Value2')])
     a = self.update.saveAndReturnObject(a)
     m = self.query.findAllByQuery((
         "from MapAnnotation m "
         "join fetch m.mapValue a "
         "where a.name='Name2'"), None)[0]
     l1 = m.getMapValue()
     assert l1[0] is None
     self.assertNV(l1[1], "Name2", "Value2")
     assert {"Name2": "Value2"} == m.getMapValueAsMap()
Ejemplo n.º 2
0
 def testBigKeys(self):
     uuid = self.uuid()
     big = uuid + "X" * 500
     a = MapAnnotationI()
     a.setMapValue([NV(big, big)])
     a = self.update.saveAndReturnObject(a)
     m = self.query.findAllByQuery((
         "from MapAnnotation m "
         "join fetch m.mapValue a "
         "where a.name like :name"),
         omero.sys.ParametersI().addString("name",
                                           uuid + "%")
     )[0]
     l1 = m.getMapValue()
     self.assertNV(l1[0], big, big)