Django

Code

Changeset 8005

Show
Ignore:
Timestamp:
07/20/08 03:47:10 (6 months ago)
Author:
russellm
Message:

Made the test case for doctest comparison of XML fragments a little more rigorous. Refs #7441.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/regressiontests/test_utils/tests.py

    r8003 r8005  
    3333...     stream = StringIO() 
    3434...     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"}) 
    3636...     xml.characters("Hello") 
    3737...     xml.endElement("foo") 
    38 ...     xml.startElement("bar", {}) 
     38...     xml.startElement("bar", {"ccc": "3.0", "ddd": "4.0"}) 
    3939...     xml.endElement("bar") 
    4040...     return stream.getvalue() 
     
    6565 
    6666>>> 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>' 
    6868 
    6969>>> 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>' 
    7171 
    7272"""