Skip to content

Commit

Permalink
Really test both serializers.
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@13640 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
  • Loading branch information
ralphm committed Apr 25, 2005
1 parent 8ae58ca commit 19ca246
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions twisted/xish/test/test_domish.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,11 @@ def testRawXMLSerialization(self):
self.assertEquals(e.toXml(), "<foo><abc123></foo>")

def testUnicodeSerialization(self):
for s in (domish._Serializer, domish._ListSerializer):
domish.SerializerClass = s
e = domish.Element(("testns", "foo"))
e["test"] = u"my value\u0221e"
e.addContent(u"A degree symbol...\u00B0")
self.assertEquals(e.toXml(),
u"<foo test='my value\u0221e'>A degree symbol...\u00B0</foo>".encode("utf-8"))
e = domish.Element(("testns", "foo"))
e["test"] = u"my value\u0221e"
e.addContent(u"A degree symbol...\u00B0")
self.assertEquals(e.toXml(),
u"<foo test='my value\u0221e'>A degree symbol...\u00B0</foo>".encode("utf-8"))

class DomishTestSerializer(unittest.TestCase, SerializerTests):
def setUpClass(self):
Expand Down

0 comments on commit 19ca246

Please sign in to comment.