summaryrefslogtreecommitdiff
path: root/tests/oauth1/rfc5849/test_utils.py
diff options
context:
space:
mode:
authorHugo <hugovk@users.noreply.github.com>2019-08-14 23:35:36 +0300
committerHugo <hugovk@users.noreply.github.com>2019-08-15 12:24:33 +0300
commit3718a0e048e64994c2ee3819c5e5ed218a05f115 (patch)
tree38b56eba3e23b5c20af0a09a6a860ecc279dc067 /tests/oauth1/rfc5849/test_utils.py
parentddc953c11e8d79607f5931a2f80dcd9f7a10c5d9 (diff)
downloadoauthlib-3718a0e048e64994c2ee3819c5e5ed218a05f115.tar.gz
Drop support for legacy Python 2.7
Diffstat (limited to 'tests/oauth1/rfc5849/test_utils.py')
-rw-r--r--tests/oauth1/rfc5849/test_utils.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/oauth1/rfc5849/test_utils.py b/tests/oauth1/rfc5849/test_utils.py
index 5a889e8..1db2659 100644
--- a/tests/oauth1/rfc5849/test_utils.py
+++ b/tests/oauth1/rfc5849/test_utils.py
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
-from oauthlib.common import unicode_type
from oauthlib.oauth1.rfc5849.utils import *
from ...unittest import TestCase
@@ -102,12 +101,12 @@ class UtilsTests(TestCase):
def test_escape(self):
self.assertRaises(ValueError, escape, b"I am a string type. Not a unicode type.")
self.assertEqual(escape("I am a unicode type."), "I%20am%20a%20unicode%20type.")
- self.assertIsInstance(escape("I am a unicode type."), unicode_type)
+ self.assertIsInstance(escape("I am a unicode type."), str)
def test_unescape(self):
self.assertRaises(ValueError, unescape, b"I am a string type. Not a unicode type.")
self.assertEqual(unescape("I%20am%20a%20unicode%20type."), 'I am a unicode type.')
- self.assertIsInstance(unescape("I%20am%20a%20unicode%20type."), unicode_type)
+ self.assertIsInstance(unescape("I%20am%20a%20unicode%20type."), str)
def test_parse_authorization_header(self):
# make us some headers
@@ -122,8 +121,8 @@ class UtilsTests(TestCase):
# are the internal components of each tuple unicode?
for k, v in authorization_headers:
- self.assertIsInstance(k, unicode_type)
- self.assertIsInstance(v, unicode_type)
+ self.assertIsInstance(k, str)
+ self.assertIsInstance(v, str)
# let's check the parsed headers created
correct_headers = [