diff options
| author | Chris McDonough <chrism@plope.com> | 2012-01-05 07:04:59 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-01-05 07:04:59 -0500 |
| commit | 403dc9f1ca3627c9456a056b7a5f6429c0c218e5 (patch) | |
| tree | e04bcb096789c25f1b417a65fe84855c6ec4235b | |
| parent | 92dcb5f1a52d46fec7c043a1b5b4158f3d013c34 (diff) | |
| download | pyramid-403dc9f1ca3627c9456a056b7a5f6429c0c218e5.tar.gz pyramid-403dc9f1ca3627c9456a056b7a5f6429c0c218e5.tar.bz2 pyramid-403dc9f1ca3627c9456a056b7a5f6429c0c218e5.zip | |
fix test failures on python 3
| -rw-r--r-- | pyramid/tests/test_config/test_util.py | 2 | ||||
| -rw-r--r-- | pyramid/tests/test_traversal.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/pyramid/tests/test_config/test_util.py b/pyramid/tests/test_config/test_util.py index 0445485cd..ebf308929 100644 --- a/pyramid/tests/test_config/test_util.py +++ b/pyramid/tests/test_config/test_util.py @@ -230,7 +230,7 @@ class Test__make_predicates(unittest.TestCase): def test_traverse_matches_with_highorder_chars(self): order, predicates, phash = self._callFUT( - traverse=text_('/La Pe\xc3\xb1a/{x}', 'utf-8')) + traverse=text_(b'/La Pe\xc3\xb1a/{x}', 'utf-8')) self.assertEqual(len(predicates), 1) pred = predicates[0] info = {'match':{'x':text_(b'Qu\xc3\xa9bec', 'utf-8')}} diff --git a/pyramid/tests/test_traversal.py b/pyramid/tests/test_traversal.py index 683679253..c9685b124 100644 --- a/pyramid/tests/test_traversal.py +++ b/pyramid/tests/test_traversal.py @@ -139,7 +139,7 @@ class ResourceTreeTraverserTests(unittest.TestCase): root = DummyContext(foo, 'root') policy = self._makeOne(root) if PY3: - path_info = b'/Qu\xc3\xa9bec'.encode('latin-1') + path_info = b'/Qu\xc3\xa9bec'.decode('latin-1') else: path_info = b'/Qu\xc3\xa9bec' environ = self._getEnviron(PATH_INFO=path_info) @@ -326,7 +326,7 @@ class ResourceTreeTraverserTests(unittest.TestCase): root = DummyContext(foo, 'root') policy = self._makeOne(root) if PY3: - vhm_root = b'/Qu\xc3\xa9bec'.encode('latin-1') + vhm_root = b'/Qu\xc3\xa9bec'.decode('latin-1') else: vhm_root = b'/Qu\xc3\xa9bec' environ = self._getEnviron(HTTP_X_VHM_ROOT=vhm_root, @@ -338,7 +338,7 @@ class ResourceTreeTraverserTests(unittest.TestCase): self.assertEqual(result['subpath'], ()) self.assertEqual( result['traversed'], - (text_(b'Qu\xc3\xa9bec', 'utf-8'), u'bar') + (text_(b'Qu\xc3\xa9bec', 'utf-8'), text_('bar')) ) self.assertEqual(result['root'], policy.root) self.assertEqual(result['virtual_root'], foo) |
