diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2018-07-23 21:56:52 +0200 |
---|---|---|
committer | Konstantin Shemyak <konstantin@shemyak.com> | 2018-07-24 12:37:06 +0300 |
commit | 2fc491dd5047a0771e47973c468abf2edaff33e7 (patch) | |
tree | b8525513890e979ae25658b818d8d470f0ed552a /tests | |
parent | 1141cb32e9a130b580e1d8e00935516889aa401d (diff) | |
download | m2crypto-2fc491dd5047a0771e47973c468abf2edaff33e7.tar.gz |
We somehow forgot to run test_util tests.
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): |