[devtools/testlib] port 'fake_form' test to io.BytesIO
authorRémi Cardona <remi.cardona@logilab.fr>
Mon, 14 Sep 2015 18:12:44 +0200
changeset 10620 30ebd6b2eaf3
parent 10619 444b1df7b4cb
child 10621 987fbc88f097
[devtools/testlib] port 'fake_form' test to io.BytesIO
devtools/test/unittest_testlib.py
--- a/devtools/test/unittest_testlib.py	Mon Sep 14 16:45:03 2015 +0200
+++ b/devtools/test/unittest_testlib.py	Mon Sep 14 18:12:44 2015 +0200
@@ -18,6 +18,7 @@
 """unittests for cw.devtools.testlib module"""
 
 from cStringIO import StringIO
+from io import BytesIO
 
 from unittest import TextTestRunner
 
@@ -33,7 +34,7 @@
         class entity:
             cw_etype = 'Entity'
             eid = 0
-        sio = StringIO('hop\n')
+        sio = BytesIO(b'hop\n')
         form = CubicWebTC.fake_form('import',
                                     {'file': ('filename.txt', sio),
                                      'encoding': u'utf-8',