예제 #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")
예제 #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")
예제 #3
0
파일: rest.py 프로젝트: sinhote/Galicaster
def get(id):
    repo = context.get_repository()
    response.content_type = 'text/xml'
    mp = repo.get(id)
    return set_manifest(mp)
예제 #4
0
파일: rest.py 프로젝트: rubenrua/Galicaster
def get(id):
    repo = context.get_repository()
    response.content_type = 'text/xml'
    mp = repo.get(id)
    return set_manifest(mp)
예제 #5
0
def get(id):
    global repo
    response.content_type = 'text/xml'
    mp = repo.get(id)
    return set_manifest(mp)
예제 #6
0
파일: rest.py 프로젝트: atlardu/Galicaster
def get(id):
    global repo
    response.content_type = 'text/xml'
    mp = repo.get(id)
    return set_manifest(mp)