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)
def test_mp_and_operations(self): xml = path.join(self.baseDir, 'manifest.xml') mp = fromXML(xml) self.assertEqual(0, len(mp.operation))
def test_mediapackage_size(self): xml = path.join(self.baseDir, 'manifest.xml') mp = fromXML(xml) self.assertEqual(mp.getSize(), 598)