Changeset 8005
- Timestamp:
- 07/20/08 03:47:10 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/tests/regressiontests/test_utils/tests.py
r8003 r8005 33 33 ... stream = StringIO() 34 34 ... xml = SimplerXMLGenerator(stream, encoding='utf-8') 35 ... xml.startElement("foo", {"aaa" : "1.0", "bbb": "2.0"})35 ... xml.startElement("foo", {"aaa": "1.0", "bbb": "2.0"}) 36 36 ... xml.characters("Hello") 37 37 ... xml.endElement("foo") 38 ... xml.startElement("bar", { })38 ... xml.startElement("bar", {"ccc": "3.0", "ddd": "4.0"}) 39 39 ... xml.endElement("bar") 40 40 ... return stream.getvalue() … … 65 65 66 66 >>> produce_xml_fragment() 67 '<foo aaa="1.0" bbb="2.0">Hello</foo><bar ></bar>'67 '<foo aaa="1.0" bbb="2.0">Hello</foo><bar ccc="3.0" ddd="4.0"></bar>' 68 68 69 69 >>> produce_xml_fragment() 70 '<foo bbb="2.0" aaa="1.0">Hello</foo><bar ></bar>'70 '<foo bbb="2.0" aaa="1.0">Hello</foo><bar ddd="4.0" ccc="3.0"></bar>' 71 71 72 72 """
