예제 #1
0
파일: test.py 프로젝트: npo-poms/scripts
    def test_post(self):
        print("posting xml")
        poms.init_target()
        mid = poms.post("""
        <program xmlns:media="urn:vpro:media:2009" xmlns:shared="urn:vpro:shared:2009" xmlns="urn:vpro:media:update:2009" type="CLIP" avType="VIDEO" embeddable="true">
           <broadcaster>VPRO</broadcaster>
           <title type="MAIN">Holland Doc</title>
           <title type="SUB">Sub title</title>
           <title type="ORIGINAL">Original title</title>
           <description type="MAIN">Main title</description>
           <description type="SHORT">Short title</description>
           <description type="EPISODE">Episode title</description>
           <tag>schaatsen</tag>
        </program>
        """)
        print(mid)
        xml = self.to_et(poms.get(mid))

        self.assertEqual(xml.findall(pref + "title[@type='MAIN']")[0].text, "Holland Doc")

        return mid
예제 #2
0
파일: test.py 프로젝트: npo-poms/scripts
 def test_get(self):
     print("getting xml")
     poms.init_target()
     xml = self.to_et(poms.get("POMS_NTR_388772"))
     self.assertEqual(xml.findall(pref + "title[@type='MAIN']")[0].text, "Winfried Draait Door")