A couple trivial Context tests
diff --git a/setup.py b/setup.py
index 91858fe..703aa03 100755
--- a/setup.py
+++ b/setup.py
@@ -79,7 +79,8 @@
                      mkExtension('SSL')],
       py_modules  = ['OpenSSL.__init__', 'OpenSSL.tsafe',
                      'OpenSSL.version', 'OpenSSL.test.__init__',
-                     'OpenSSL.test.test_crypto'],
+                     'OpenSSL.test.test_crypto',
+                     'OpenSSL.test.test_ssl'],
       description = 'Python wrapper module around the OpenSSL library',
       author = 'Martin Sjögren, AB Strakt', author_email = 'msjogren@gmail.com',
       url = 'http://pyopenssl.sourceforge.net/',
diff --git a/src/ssl/context.c b/src/ssl/context.c
index 482cc1a..da4402b 100644
--- a/src/ssl/context.c
+++ b/src/ssl/context.c
@@ -498,7 +498,7 @@
 	if (!PyArg_ParseTuple(args, "O:use_privatekey", &pkey))
 	    return NULL;
 
-	if (strcmp(pkey->ob_type->tp_name, "PKey") != 0 || 
+	if (strcmp(pkey->ob_type->tp_name, "PKey") != 0 ||
 	    pkey->ob_type->tp_basicsize != sizeof(crypto_PKeyObj))
 	{
 	    PyErr_SetString(PyExc_TypeError, "Expected a PKey object");
diff --git a/test/test_ssl.py b/test/test_ssl.py
new file mode 100644
index 0000000..8166130
--- /dev/null
+++ b/test/test_ssl.py
@@ -0,0 +1,36 @@
+"""
+Unit tests for L{OpenSSL.SSL}.
+"""
+
+from unittest import TestCase
+
+from OpenSSL.crypto import TYPE_RSA, PKey
+from OpenSSL.SSL import Context
+from OpenSSL.SSL import SSLv2_METHOD, SSLv3_METHOD, SSLv23_METHOD, TLSv1_METHOD
+
+
+class ContextTests(TestCase):
+    """
+    Unit tests for L{OpenSSL.SSL.Context}.
+    """
+    def test_method(self):
+        """
+        L{Context} can be instantiated with one of L{SSLv2_METHOD},
+        L{SSLv3_METHOD}, L{SSLv23_METHOD}, or L{TLSv1_METHOD}.
+        """
+        for meth in [SSLv2_METHOD, SSLv3_METHOD, SSLv23_METHOD, TLSv1_METHOD]:
+            Context(meth)
+        self.assertRaises(TypeError, Context, "")
+        self.assertRaises(ValueError, Context, 10)
+
+
+    def test_use_privatekey(self):
+        """
+        L{Context.use_privatekey} takes an L{OpenSSL.crypto.PKey} instance.
+        """
+        key = PKey()
+        key.generate_key(TYPE_RSA, 128)
+        ctx = Context(TLSv1_METHOD)
+        ctx.use_privatekey(key)
+        self.assertRaises(TypeError, ctx.use_privatekey, "")
+