Esempio n. 1
0
    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")
Esempio n. 2
0
    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")
Esempio n. 3
0
def get(id):
    repo = context.get_repository()
    response.content_type = 'text/xml'
    mp = repo.get(id)
    return set_manifest(mp)
Esempio n. 4
0
def get(id):
    repo = context.get_repository()
    response.content_type = 'text/xml'
    mp = repo.get(id)
    return set_manifest(mp)
Esempio n. 5
0
def get(id):
    global repo
    response.content_type = 'text/xml'
    mp = repo.get(id)
    return set_manifest(mp)
Esempio n. 6
0
def get(id):
    global repo
    response.content_type = 'text/xml'
    mp = repo.get(id)
    return set_manifest(mp)