Esempio n. 1
0
 def test_fromXML(self):        
     xml = path.join(self.baseDir, 'manifest.xml')
     mp = fromXML(xml)
     self.assertEqual(mp.title, "Opening a folder...")
     self.assertEqual(mp.getIdentifier(), "dae91194-2114-481b-8908-8a8962baf8dc")
     self.assertEqual(mp.status, 0)
     self.assertEqual(mp.properties['notes'], u"Nota de Prueba <?php Caracteres ñ I'm raros >")
 def test_fromXML_without_galicaster_xml(self):
     logger = context.get_logger()
     xml = path.join(self.baseDir, 'wrongmp', 'manifest.xml')
     mp = fromXML(xml, logger)
     self.assertEqual(mp.title, "Opening a folder...")
     self.assertEqual(mp.getIdentifier(), "dae91194-2114-481b-8908-8a8962baf8dc")
     self.assertEqual(mp.status, 4)
Esempio n. 3
0
 def test_fromXML_without_galicaster_xml(self):
     logger = context.get_logger()
     xml = path.join(self.baseDir, 'wrongmp', 'manifest.xml')
     mp = fromXML(xml, logger)
     self.assertEqual(mp.title, "Opening a folder...")
     self.assertEqual(mp.getIdentifier(),
                      "dae91194-2114-481b-8908-8a8962baf8dc")
     self.assertEqual(mp.status, 4)
Esempio n. 4
0
 def test_fromXML(self):
     xml = path.join(self.baseDir, 'manifest.xml')
     mp = fromXML(xml)
     self.assertEqual(mp.title, "Opening a folder...")
     self.assertEqual(mp.getIdentifier(),
                      "dae91194-2114-481b-8908-8a8962baf8dc")
     self.assertEqual(mp.status, 0)
     self.assertEqual(mp.properties['notes'],
                      u"Nota de Prueba <?php Caracteres ñ I'm raros >")
Esempio n. 5
0
 def test_mp_and_operations(self):
     xml = path.join(self.baseDir, 'manifest.xml')
     mp = fromXML(xml)
     self.assertEqual(0, len(mp.operation))
Esempio n. 6
0
 def test_mediapackage_size(self):
     xml = path.join(self.baseDir, 'manifest.xml')
     mp = fromXML(xml)
     self.assertEqual(mp.getSize(), 598)
Esempio n. 7
0
 def test_mp_and_operations(self):
     xml = path.join(self.baseDir, 'manifest.xml')
     mp = fromXML(xml)
     self.assertEqual(0, len(mp.operation))
Esempio n. 8
0
 def test_mediapackage_size(self):
     xml = path.join(self.baseDir, 'manifest.xml')
     mp = fromXML(xml)
     self.assertEqual(mp.getSize(), 598)