def test_001(self): with open(utils.data('001_source.xml')) as src: with self.assertRaises(ruledxml.exceptions.RuledXmlException): ruledxml.run(src, utils.data('001_rules.py'), io.BytesIO())
def test_003(self): result = io.BytesIO() with open(utils.data('003_source.xml')) as src: ruledxml.run(src, utils.data('003_rules.py'), result) with open(utils.data('003_target.xml'), 'rb') as target: utils.xmlEquals(self, result.getvalue(), target.read())
def test_020(self): result = io.BytesIO() with open(utils.data('020_source.xml')) as src: with self.assertRaises(ruledxml.exceptions.RuleForeachException): ruledxml.run(src, utils.data('020_rules.py'), result)