Skip to content

Commit

Permalink
Added test for issue #8.
Browse files Browse the repository at this point in the history
  • Loading branch information
stchris committed Mar 22, 2013
1 parent 80b6594 commit 1cb3775
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/res/unicode.xml
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?> <page> <menu> <name>ðÒÉ×ÅÔ ÍÉÒ</name> <items> <item> <name>ðÕÎËÔ 1</name> <url>http://example1.com</url> </item> <item> <name>ðÕÎËÔ 2</name> <url>http://example2.com</url> </item> </items> </menu> </page>
6 changes: 6 additions & 0 deletions tests/tests.py
Expand Up @@ -199,6 +199,12 @@ def test_twiml_dir(self):
o.Response.Redirect.cdata
)

class UnicodeTestCase(unittest.TestCase):
""" Github issue #8: UnicodeEncodeError """
def test_unicode_file(self):
o = untangle.parse('tests/res/unicode.xml')
print o.page.menu.name

if __name__ == '__main__':
unittest.main()

Expand Down

0 comments on commit 1cb3775

Please sign in to comment.