示例#1
0
文件: tests.py 项目: pinkeen/htxpath
 def testTagClosing(self):
     result = htxpath.find(self.testData, "/html/this-tag-is-open")
     result = htxpath.getAttributes(result[0])
     wanted = {'ourvalue': 'hooray!'}
     self.assertEqual(result, wanted)
示例#2
0
文件: tests.py 项目: pinkeen/htxpath
 def testAbsoluteSimplePathGetAttrs(self):
     result = htxpath.find(self.testData, "/html/body/span/input")
     result = htxpath.getAttributes(result[0])
     wanted = {'color': 'humorous', 'type': 'help3', 'value': 'OK5'}
     self.assertEqual(result, wanted)