From 8f2fbe31c6c1aaa1b7792249ebeb984946e7a5e1 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 18 Nov 2018 23:29:18 -0600 Subject: stop using u-prefix strings --- tests/test_traversal.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/test_traversal.py') diff --git a/tests/test_traversal.py b/tests/test_traversal.py index de712a6e8..188ee803c 100644 --- a/tests/test_traversal.py +++ b/tests/test_traversal.py @@ -677,7 +677,7 @@ class FindResourceTests(unittest.TestCase): def test_absolute_unicode_found(self): # test for bug wiggy found in wild, traceback stack: - # root = u'/%E6%B5%81%E8%A1%8C%E8%B6%8B%E5%8A%BF' + # root = '/%E6%B5%81%E8%A1%8C%E8%B6%8B%E5%8A%BF' # wiggy's code: section=find_resource(page, root) # find_resource L76: D = traverse(resource, path) # traverse L291: return traverser(request) @@ -1214,18 +1214,18 @@ class Test__join_path_tuple(unittest.TestCase): def test_segments_with_unsafes(self): safe_segments = tuple( - u"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" - u"-._~!$&'()*+,;=:@" + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "-._~!$&'()*+,;=:@" ) result = self._callFUT(safe_segments) - self.assertEqual(result, u'/'.join(safe_segments)) + self.assertEqual(result, '/'.join(safe_segments)) unsafe_segments = tuple( chr(i) for i in range(0x20, 0x80) if not chr(i) in safe_segments - ) + (u'あ',) + ) + ('あ',) result = self._callFUT(unsafe_segments) self.assertEqual( result, - u'/'.join( + '/'.join( ''.join( '%%%02X' % (ord(c) if isinstance(c, str) else c) for c in unsafe_segment.encode('utf-8') -- cgit v1.2.3