Ejemplo n.º 1
0
 def test_find_image_in_annotation_on_object(self):
     annotations = IAnnotations(self.page_obj)
     annotations[ANNOTATIONS_KEY_PREFIX + 'foobar'] = {
         'image': self.img_uid
     }
     image = lead.find_image(self.page_obj)
     self.assertEquals(IUUID(image), self.img_uid)
Ejemplo n.º 2
0
    def test_find_lead_image_in_text(self):
        self.page_obj.text = RichTextValue('''
<p>
<img src="resolveuid/{}/@@images/image/large" />
</p>
        '''.format(IUUID(self.image_obj)),
                                           mimeType='text/html',
                                           outputMimeType='text/html')
        image = lead.find_image(self.page_obj)
        self.assertEquals(IUUID(image), self.img_uid)
Ejemplo n.º 3
0
    def test_find_image_in_annotation_with_html_on_object(self):
        annotations = IAnnotations(self.page_obj)
        annotations[ANNOTATIONS_KEY_PREFIX + 'foobar'] = {
            'content':
            '''
<p>
<img src="resolveuid/{}/@@images/image/large" />
</p>
            '''.format(self.img_uid)
        }
        image = lead.find_image(self.page_obj)
        self.assertEquals(IUUID(image), self.img_uid)