diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/alltests.py | 1 | ||||
-rw-r--r-- | tests/test_util.py | 16 |
2 files changed, 6 insertions, 11 deletions
diff --git a/tests/alltests.py b/tests/alltests.py index fe5cf91..a0e7739 100644 --- a/tests/alltests.py +++ b/tests/alltests.py @@ -40,6 +40,7 @@ def suite(): 'tests.test_smime', 'tests.test_ssl_offline', 'tests.test_threading', + 'tests.test_util', 'tests.test_x509', 'tests.test_timeout'] if os.name == 'posix': diff --git a/tests/test_util.py b/tests/test_util.py index 0aa4c5e..f4c758e 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -12,28 +12,22 @@ from tests import unittest class UtilTestCase(unittest.TestCase): def test_py3bytes(self): - self.assertIsInstance(six.ensure_binary('test'), bytes) + self.assertIsInstance(six.ensure_binary('test'), six.binary_type) def test_py3str(self): - self.assertIsInstance(six.ensure_text('test'), str) + self.assertIsInstance(six.ensure_text('test'), six.text_type) def test_py3bytes_str(self): - self.assertIsInstance(six.ensure_binary(u'test'), bytes) + self.assertIsInstance(six.ensure_binary(u'test'), six.binary_type) def test_py3str_str(self): self.assertIsInstance(six.ensure_text(u'test'), six.string_types) def test_py3bytes_bytes(self): - self.assertIsInstance(six.ensure_binary(b'test'), bytes) + self.assertIsInstance(six.ensure_binary(b'test'), six.binary_type) def test_py3str_bytes(self): - self.assertIsInstance(six.ensure_text(b'test'), str) - - def test_py3bytes_bytearray(self): - self.assertIsInstance(six.ensure_binary(bytearray(b'test')), bytearray) - - def test_py3str_bytearray(self): - self.assertIsInstance(six.ensure_text(bytearray(b'test')), str) + self.assertIsInstance(six.ensure_text(b'test'), six.text_type) def test_py3bytes_None(self): with self.assertRaises(TypeError): |