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)
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)