Fix the import_crypto_module helper and factor some str/unicode helpers into the test util module
diff --git a/OpenSSL/ssl/context.c b/OpenSSL/ssl/context.c
index d4cae75..d6c844b 100644
--- a/OpenSSL/ssl/context.c
+++ b/OpenSSL/ssl/context.c
@@ -376,7 +376,7 @@
         name_attr = asciiname;
     }
 #endif
-    right_name = (PyText_CheckExact(name_attr) &&
+    right_name = (PyBytes_CheckExact(name_attr) &&
                   strcmp(name, PyBytes_AsString(name_attr)) == 0);
     Py_DECREF(name_attr);
     res = (PyTypeObject *)type;