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