diff options
| author | Michael Merickel <github@m.merickel.org> | 2018-11-26 17:10:21 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-26 17:10:21 -0600 |
| commit | 587fe72fae0efda3a860d37a1ea2449a41dab622 (patch) | |
| tree | ad938e23efd1be67821ddfb710748e746c92c420 /tests/test_integration.py | |
| parent | eea97ca673a53f8aa039a78e61833f78d5d59583 (diff) | |
| parent | 81171e861d25d394c0ccb8a6139a9b89dc4f039c (diff) | |
| download | pyramid-587fe72fae0efda3a860d37a1ea2449a41dab622.tar.gz pyramid-587fe72fae0efda3a860d37a1ea2449a41dab622.tar.bz2 pyramid-587fe72fae0efda3a860d37a1ea2449a41dab622.zip | |
Merge pull request #3421 from mmerickel/drop-py2
remove py2 from the codebase
Diffstat (limited to 'tests/test_integration.py')
| -rw-r--r-- | tests/test_integration.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/test_integration.py b/tests/test_integration.py index d57a7cf6e..e6dccbb5b 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -4,14 +4,15 @@ import gc import locale import os import unittest +from urllib.parse import quote from webtest import TestApp from zope.interface import Interface -from pyramid.wsgi import wsgiapp -from pyramid.view import view_config from pyramid.static import static_view from pyramid.testing import skip_on -from pyramid.compat import text_, url_quote +from pyramid.util import text_ +from pyramid.view import view_config +from pyramid.wsgi import wsgiapp from .pkgs.exceptionviewapp.models import AnException, NotAnException @@ -108,7 +109,7 @@ class StaticAppBase(IntegrationBase): os.makedirs(pathdir) with open(path, 'wb') as fp: fp.write(body) - url = url_quote('/static/héhé/index.html') + url = quote('/static/héhé/index.html') res = self.testapp.get(url, status=200) self.assertEqual(res.body, body) finally: @@ -123,7 +124,7 @@ class StaticAppBase(IntegrationBase): with open(path, 'wb') as fp: fp.write(body) try: - url = url_quote('/static/héhé.html') + url = quote('/static/héhé.html') res = self.testapp.get(url, status=200) self.assertEqual(res.body, body) finally: @@ -725,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): |
