Fix the import_crypto_module helper and factor some str/unicode helpers into the test util module
diff --git a/OpenSSL/test/test_crypto.py b/OpenSSL/test/test_crypto.py
index 5cbc105..a86bfac 100644
--- a/OpenSSL/test/test_crypto.py
+++ b/OpenSSL/test/test_crypto.py
@@ -23,18 +23,7 @@
from OpenSSL.crypto import CRL, Revoked, load_crl
from OpenSSL.crypto import NetscapeSPKI, NetscapeSPKIType
from OpenSSL.crypto import sign, verify
-from OpenSSL.test.util import TestCase
-
-
-try:
- bytes
-except NameError:
- def b(s):
- return s
- bytes = str
-else:
- def b(s):
- return s.encode("ascii")
+from OpenSSL.test.util import TestCase, bytes, b
root_cert_pem = b("""-----BEGIN CERTIFICATE-----