Ticket #4683: sux-main-4683.patch

File sux-main-4683.patch, 819 bytes (added by Thijs Triemstra, 11 years ago)
  • twisted/web/sux.py

     
    635635
    636636        Default behaviour is to print.'''
    637637        print 'end', name
    638 
    639 if __name__ == '__main__':
    640     from cStringIO import StringIO
    641     testDocument = '''
    642 
    643     <!DOCTYPE ignore all this shit, hah its malformed!!!!@$>
    644     <?xml version="suck it"?>
    645     <foo>
    646     &#65;
    647     <bar />
    648     <baz boz="buz">boz &zop;</baz>
    649     <![CDATA[ foo bar baz ]]>
    650     </foo>
    651     '''
    652     x = XMLParser()
    653     x.makeConnection(FileWrapper(StringIO()))
    654     # fn = "/home/glyph/Projects/Twisted/doc/howto/ipc10paper.html"
    655     fn = "/home/glyph/gruesome.xml"
    656     # testDocument = open(fn).read()
    657     x.dataReceived(testDocument)