|
18 | 18 | from roundup.cgi.templating import HTMLProperty, _HTMLItem, anti_csrf_nonce |
19 | 19 | from roundup.cgi.form_parser import FormParser |
20 | 20 | from roundup import init, instance, password, hyperdb, date |
21 | | -from roundup.anypy.strings import StringIO |
| 21 | +from roundup.anypy.strings import StringIO, u2s |
22 | 22 |
|
23 | 23 | # For testing very simple rendering |
24 | 24 | from roundup.cgi.engine_zopetal import RoundupPageTemplate |
@@ -1330,13 +1330,13 @@ def testEditCSV(self): |
1330 | 1330 | self.assertEqual(cl._ok_message, ['Items edited OK']) |
1331 | 1331 | k = self.db.keyword.getnode('1') |
1332 | 1332 | self.assertEqual(k.name, 'newkey') |
1333 | | - form = dict(rows=u'id,name\n1,\xe4\xf6\xfc'.encode('utf-8')) |
| 1333 | + form = dict(rows=u2s(u'id,name\n1,\xe4\xf6\xfc')) |
1334 | 1334 | cl = self._make_client(form, userid='1', classname='keyword') |
1335 | 1335 | cl._ok_message = [] |
1336 | 1336 | actions.EditCSVAction(cl).handle() |
1337 | 1337 | self.assertEqual(cl._ok_message, ['Items edited OK']) |
1338 | 1338 | k = self.db.keyword.getnode('1') |
1339 | | - self.assertEqual(k.name, u'\xe4\xf6\xfc'.encode('utf-8')) |
| 1339 | + self.assertEqual(k.name, u2s(u'\xe4\xf6\xfc')) |
1340 | 1340 |
|
1341 | 1341 | def testserve_static_files(self): |
1342 | 1342 | # make a client instance |
|
0 commit comments