diff options
author | liyou01 <liyou01@inspur.com> | 2021-01-07 15:57:43 +0800 |
---|---|---|
committer | Cyril Roelandt <cyril@redhat.com> | 2022-05-25 04:42:06 +0200 |
commit | 5ff06df97fbd78f6781793c35801a4c989a515f1 (patch) | |
tree | e81f73b2d062ebccd0a3ed8e8ab20f545dffca5c /glance_store/tests/unit/test_exceptions.py | |
parent | aeee48b561ba0d100663311c3ba94f0d128105aa (diff) | |
download | glance_store-5ff06df97fbd78f6781793c35801a4c989a515f1.tar.gz |
Remove Python 2 support
Python 2 has been deprecated for almost two years, and has not been
guaranteed to work with glance_store for a while. This patch removes all
traces of six, unicode strings and Python 2 tweaks.
Co-Authored-By: Cyril Roelandt <cyril@redhat.com>
Change-Id: Ifa78924d7ecf4f2d9a54c677888ab2926530c487
Diffstat (limited to 'glance_store/tests/unit/test_exceptions.py')
-rw-r--r-- | glance_store/tests/unit/test_exceptions.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/glance_store/tests/unit/test_exceptions.py b/glance_store/tests/unit/test_exceptions.py index d9fe1e1..ed2bf05 100644 --- a/glance_store/tests/unit/test_exceptions.py +++ b/glance_store/tests/unit/test_exceptions.py @@ -14,7 +14,6 @@ # under the License. from oslo_utils import encodeutils from oslotest import base -import six import glance_store @@ -23,11 +22,11 @@ class TestExceptions(base.BaseTestCase): """Test routines in glance_store.common.utils.""" def test_backend_exception(self): msg = glance_store.BackendException() - self.assertIn(u'', encodeutils.exception_to_unicode(msg)) + self.assertIn('', encodeutils.exception_to_unicode(msg)) def test_unsupported_backend_exception(self): msg = glance_store.UnsupportedBackend() - self.assertIn(u'', encodeutils.exception_to_unicode(msg)) + self.assertIn('', encodeutils.exception_to_unicode(msg)) def test_redirect_exception(self): # Just checks imports work ok @@ -54,4 +53,4 @@ class TestExceptions(base.BaseTestCase): def test_non_unicode_error_msg(self): exc = glance_store.NotFound(str('test')) self.assertIsInstance(encodeutils.exception_to_unicode(exc), - six.text_type) + str) |