[web/test] Binary eats bytes
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 12 Oct 2015 18:42:38 +0200
changeset 10782 65bb683d2a51
parent 10781 e2ab20561932
child 10783 02cc22d7d339
[web/test] Binary eats bytes
web/test/unittest_form.py
--- a/web/test/unittest_form.py	Tue Oct 06 11:19:37 2015 +0200
+++ b/web/test/unittest_form.py	Mon Oct 12 18:42:38 2015 +0200
@@ -217,7 +217,7 @@
                 eidparam=True, role='subject')
         with self.admin_access.web_request() as req:
             file = req.create_entity('File', data_name=u"pouet.txt", data_encoding=u'UTF-8',
-                                     data=Binary('new widgets system'))
+                                     data=Binary(b'new widgets system'))
             form = FFForm(req, redirect_path='perdu.com', entity=file)
             self.assertMultiLineEqual(self._render_entity_field(req, 'data', form),
                               '''<input id="data-subject:%(eid)s" name="data-subject:%(eid)s" tabindex="1" type="file" value="" />
@@ -241,7 +241,7 @@
                 eidparam=True, role='subject')
         with self.admin_access.web_request() as req:
             file = req.create_entity('File', data_name=u"pouet.txt", data_encoding=u'UTF-8',
-                                     data=Binary('new widgets system'))
+                                     data=Binary(b'new widgets system'))
             form = EFFForm(req, redirect_path='perdu.com', entity=file)
             self.assertMultiLineEqual(self._render_entity_field(req, 'data', form),
                               '''<input id="data-subject:%(eid)s" name="data-subject:%(eid)s" tabindex="1" type="file" value="" />