summaryrefslogtreecommitdiff
path: root/OpenSSL/test/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSSL/test/util.py')
-rw-r--r--OpenSSL/test/util.py22
1 files changed, 2 insertions, 20 deletions
diff --git a/OpenSSL/test/util.py b/OpenSSL/test/util.py
index bc398a1..011e7da 100644
--- a/OpenSSL/test/util.py
+++ b/OpenSSL/test/util.py
@@ -19,16 +19,7 @@ from OpenSSL.crypto import Error
import memdbg
-if sys.version_info < (3, 0):
- def b(s):
- return s
- bytes = str
-else:
- def b(s):
- return s.encode("charmap")
- bytes = bytes
-
-from OpenSSL._util import ffi, lib
+from OpenSSL._util import ffi, lib, byte_string as b
class TestCase(TestCase):
"""
@@ -283,20 +274,11 @@ class TestCase(TestCase):
"""
if self._temporaryFiles is None:
self._temporaryFiles = []
- temp = mktemp(dir=".")
+ temp = b(mktemp(dir="."))
self._temporaryFiles.append(temp)
return temp
- # Python 2.3 compatibility.
- def assertTrue(self, *a, **kw):
- return self.failUnless(*a, **kw)
-
-
- def assertFalse(self, *a, **kw):
- return self.failIf(*a, **kw)
-
-
# Other stuff
def assertConsistentType(self, theType, name, *constructionArgs):
"""