diff --git a/tests/samples/use_defusedxml.py b/tests/samples/use_defusedxml.py index fb864488..2f1c8142 100644 --- a/tests/samples/use_defusedxml.py +++ b/tests/samples/use_defusedxml.py @@ -1,5 +1,7 @@ -from io import StringIO -from xml.etree import ElementTree, ElementInclude # pylint: disable=unused-import +import xml.sax -xml = StringIO("Hello XML") -et = ElementTree.parse(xml) +parser = xml.sax.make_parser() +# myHandler = MyHandler() +# parser.setContentHandler(myHandler) +# parser.setFeature(feature_external_ges, True) # Noncompliant +parser.parse('xxe.xml')