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