summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pyramid/util.py8
-rw-r--r--tests/test_integration.py4
-rw-r--r--tests/test_traversal.py12
3 files changed, 12 insertions, 12 deletions
diff --git a/src/pyramid/util.py b/src/pyramid/util.py
index 1180fce83..cad8142dd 100644
--- a/src/pyramid/util.py
+++ b/src/pyramid/util.py
@@ -338,14 +338,14 @@ def object_description(object):
usually involving a Python dotted name. For example:
>>> object_description(None)
- u'None'
+ 'None'
>>> from xml.dom import minidom
>>> object_description(minidom)
- u'module xml.dom.minidom'
+ 'module xml.dom.minidom'
>>> object_description(minidom.Attr)
- u'class xml.dom.minidom.Attr'
+ 'class xml.dom.minidom.Attr'
>>> object_description(minidom.Attr.appendChild)
- u'method appendChild of class xml.dom.minidom.Attr'
+ 'method appendChild of class xml.dom.minidom.Attr'
If this method cannot identify the type of the object, a generic
description ala ``object <object.__name__>`` will be returned.
diff --git a/tests/test_integration.py b/tests/test_integration.py
index d1f65274b..e6dccbb5b 100644
--- a/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -726,8 +726,8 @@ class UnicodeInURLTest(unittest.TestCase):
res = testapp.get(request_path, status=404)
# Pyramid default 404 handler outputs:
- # u'404 Not Found\n\nThe resource could not be found.\n\n\n'
- # u'/avalia\xe7\xe3o_participante\n\n'
+ # '404 Not Found\n\nThe resource could not be found.\n\n\n'
+ # '/avalia\xe7\xe3o_participante\n\n'
self.assertTrue(request_path_unicode in res.text)
def test_unicode_in_url_200(self):
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')