Skip to content

Commit 07636f2

Browse files
committed
fixed string encoding in test case
1 parent 31a3fb4 commit 07636f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_cgi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from roundup.cgi.templating import HTMLProperty, _HTMLItem, anti_csrf_nonce
1919
from roundup.cgi.form_parser import FormParser
2020
from roundup import init, instance, password, hyperdb, date
21-
from roundup.anypy.strings import StringIO
21+
from roundup.anypy.strings import StringIO, u2s
2222

2323
# For testing very simple rendering
2424
from roundup.cgi.engine_zopetal import RoundupPageTemplate
@@ -1330,13 +1330,13 @@ def testEditCSV(self):
13301330
self.assertEqual(cl._ok_message, ['Items edited OK'])
13311331
k = self.db.keyword.getnode('1')
13321332
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'))
13341334
cl = self._make_client(form, userid='1', classname='keyword')
13351335
cl._ok_message = []
13361336
actions.EditCSVAction(cl).handle()
13371337
self.assertEqual(cl._ok_message, ['Items edited OK'])
13381338
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'))
13401340

13411341
def testserve_static_files(self):
13421342
# make a client instance

0 commit comments

Comments
 (0)