[py3] Force XML serialization to unicode in profile generation tests
authorDenis Laxalde <denis.laxalde@logilab.fr>
Wed, 02 Oct 2019 15:01:36 +0200
changeset 3044 fe168e4a546b
parent 3043 01ca8b6ba1d5
child 3045 97f0cc843868
[py3] Force XML serialization to unicode in profile generation tests
test/test_profile_generation.py
--- a/test/test_profile_generation.py	Wed Oct 02 14:53:12 2019 +0200
+++ b/test/test_profile_generation.py	Wed Oct 02 15:01:36 2019 +0200
@@ -586,7 +586,8 @@
 
             profile = self.profile_etree(transfer)
             mt = self.get_element(profile, 'MimeType')
-            self.assertEqual('\n'.join(etree.tostring(mt, pretty_print=True).splitlines()[1:-1]),
+            self.assertEqual('\n'.join(etree.tostring(mt, encoding=text_type,
+                                                      pretty_print=True).splitlines()[1:-1]),
                              '''\
   <rng:choice>
     <rng:value type="token">application/msword</rng:value>