From 0b570220d9f442700eb97c5a5c4eca6ab03a1ee4 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 14 Nov 2018 19:13:07 -0600 Subject: remove urllib.parse shims --- tests/test_integration.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/test_integration.py') diff --git a/tests/test_integration.py b/tests/test_integration.py index d57a7cf6e..0652d8ee8 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -4,6 +4,7 @@ import gc import locale import os import unittest +from urllib.parse import quote from webtest import TestApp from zope.interface import Interface @@ -11,7 +12,7 @@ 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.compat import text_ 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: -- cgit v1.2.3 From 2f8ede09e52162e475aececf587b21e96a2b1a79 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 14 Nov 2018 22:15:57 -0600 Subject: move text_, bytes_ and ascii_ to pyramid.util and remove native_ --- tests/test_integration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/test_integration.py') diff --git a/tests/test_integration.py b/tests/test_integration.py index 0652d8ee8..d1f65274b 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -8,11 +8,11 @@ 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_ +from pyramid.util import text_ +from pyramid.view import view_config +from pyramid.wsgi import wsgiapp from .pkgs.exceptionviewapp.models import AnException, NotAnException -- cgit v1.2.3 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_integration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test_integration.py') 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): -- cgit v1.2.3