diff --git a/tests/storage/__init__.py b/tests/storage/__init__.py index b19ba85..52c6fa2 100644 --- a/tests/storage/__init__.py +++ b/tests/storage/__init__.py @@ -42,8 +42,8 @@ class StorageTests(object): hrefs.sort() assert hrefs == sorted(s.list()) for href, etag in hrefs: - assert isinstance(href, (str, unicode)) - assert isinstance(etag, (str, unicode)) + assert isinstance(href, (text_type, bytes)) + assert isinstance(etag, (text_type, bytes)) assert s.has(href) item, etag2 = s.get(href) assert etag == etag2 diff --git a/tests/test_utils.py b/tests/test_utils.py index b7f6c9c..124e3dc 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -38,7 +38,7 @@ def test_parse_options(): # Yes, we want a very strong typecheck here, because we actually have # to differentiate between bool and int, and in Python 2, bool is a # subclass of int. - assert type(a[key]) is type(expected[key]) + assert type(a[key]) is type(expected[key]) # flake8: noqa def test_get_password_from_netrc(monkeypatch): diff --git a/vdirsyncer/utils.py b/vdirsyncer/utils.py index 856525e..19792a2 100644 --- a/vdirsyncer/utils.py +++ b/vdirsyncer/utils.py @@ -22,7 +22,7 @@ PY2 = sys.version_info[0] == 2 if PY2: import urlparse - text_type = unicode + text_type = unicode # flake8: noqa iteritems = lambda x: x.iteritems() itervalues = lambda x: x.itervalues() else: