diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2015-10-25 20:30:54 +0100 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2015-10-25 20:30:54 +0100 |
commit | 387db16a789fea25795433538d80513c18d0f699 (patch) | |
tree | f063b2b90017abbc6aa5491f48b09a342b263b3c /test | |
parent | 36e6f62cd0883f0f486d1666d010e5d9e6d515bd (diff) |
[compat] compat_etree_fromstring: only decode bytes objects
Diffstat (limited to 'test')
-rw-r--r-- | test/test_compat.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test_compat.py b/test/test_compat.py index 2b0860479..834f4bc55 100644 --- a/test/test_compat.py +++ b/test/test_compat.py @@ -74,9 +74,10 @@ class TestCompat(unittest.TestCase): self.assertEqual(compat_shlex_split('-option "one two"'), ['-option', 'one two']) def test_compat_etree_fromstring(self): - xml = '<el foo="bar"></el>' + xml = '<el foo="bar" spam="中文"></el>' doc = compat_etree_fromstring(xml.encode('utf-8')) self.assertTrue(isinstance(doc.attrib['foo'], compat_str)) + self.assertTrue(isinstance(doc.attrib['spam'], compat_str)) if __name__ == '__main__': unittest.main() |