Esempio n. 1
0
 def testImage_Full(self):
     image = MockImage("hot stuff here", "test.gif", "image/gif")
     root = self.root()
     view = ExportSurvey(None, None)
     image = view.exportImage(root, image, u"Captiøn")
     self.assertEqual(etree.tostring(image, pretty_print=True),
             '<image xmlns="http://xml.simplon.biz/euphorie/survey/1.0" '
             'content-type="image/gif" filename="test.gif" '
             'caption="Capti&#xF8;n">aG90IHN0dWZmIGhlcmU=\n'
             '</image>\n')
Esempio n. 2
0
 def testImage_Minimal(self):
     image = MockImage("hot stuff here")
     root = self.root()
     view = ExportSurvey(None, None)
     node = view.exportImage(root, image)
     self.assertTrue(node in root)
     self.assertEqual(
             etree.tostring(node, pretty_print=True),
             '<image xmlns="http://xml.simplon.biz/euphorie/survey/1.0">'
             'aG90IHN0dWZmIGhlcmU=\n</image>\n')
Esempio n. 3
0
 def testImage_Minimal(self):
     image = MockImage("hot stuff here")
     root = self.root()
     view = ExportSurvey(None, None)
     node = view.exportImage(root, image)
     self.assertTrue(node in root)
     self.assertEqual(
         etree.tostring(node, pretty_print=True),
         '<image xmlns="http://xml.simplon.biz/euphorie/survey/1.0">'
         'aG90IHN0dWZmIGhlcmU=\n</image>\n')
Esempio n. 4
0
 def testImage_Full(self):
     image = MockImage("hot stuff here", "test.gif", "image/gif")
     root = self.root()
     view = ExportSurvey(None, None)
     image = view.exportImage(root, image, u"Captiøn")
     self.assertEqual(
         etree.tostring(image, pretty_print=True),
         '<image xmlns="http://xml.simplon.biz/euphorie/survey/1.0" '
         'content-type="image/gif" filename="test.gif" '
         'caption="Capti&#xF8;n">aG90IHN0dWZmIGhlcmU=\n'
         '</image>\n')