def test_serializer(self): mp = mediapackage.Mediapackage() mp.add(self.track1) mp.add(self.track2) mp.add(self.catalog) mp.status = mediapackage.SCHEDULED mp.notes = u"Nota de Prueba <?php Caracteres ñ I'm raros >" try: parseString(serializer.set_manifest(mp)) except ExpatError: raise AssertionError("Error in serializer.set_manifest") try: parseString(serializer.set_episode(mp)) except ExpatError: raise AssertionError("Error in serializer.set_episode") try: json.loads(serializer.set_properties(mp)) except ExpatError: raise AssertionError("Error in serializer.set_properties")
def test_serializer(self): mp = mediapackage.Mediapackage() mp.add(self.track1) mp.add(self.track2) mp.add(self.catalog) mp.status = mediapackage.PENDING mp.notes = u"Nota de Prueba <?php Caracteres ñ I'm raros >" try: parseString(serializer.set_manifest(mp)) except ExpatError: raise AssertionError("Error in serializer.set_manifest") try: parseString(serializer.set_episode(mp)) except ExpatError: raise AssertionError("Error in serializer.set_episode") try: parseString(serializer.set_properties(mp)) except ExpatError: raise AssertionError("Error in serializer.set_properties")
def get(id): repo = context.get_repository() response.content_type = 'text/xml' mp = repo.get(id) return set_manifest(mp)
def get(id): global repo response.content_type = 'text/xml' mp = repo.get(id) return set_manifest(mp)