handle some errors from extension creation
diff --git a/test/test_crypto.py b/test/test_crypto.py
index 96dbcc1..d4c4b68 100644
--- a/test/test_crypto.py
+++ b/test/test_crypto.py
@@ -83,6 +83,7 @@
         return self.failIf(*a, **kw)
 
 
+
 class X509ExtTests(TestCase, _Python23TestCaseHelper):
     def test_construction(self):
         """
@@ -102,6 +103,17 @@
                 comment, type(comment), X509ExtensionType))
 
 
+    def test_invalid_extension(self):
+        """
+        L{X509Extension} raises something if it is passed a bad extension
+        name or value.
+        """
+        self.assertRaises(
+            Error, X509Extension, 'thisIsMadeUp', False, 'hi')
+        self.assertRaises(
+            Error, X509Extension, 'basicConstraints', False, 'blah blah')
+
+
     def test_get_critical(self):
         """
         L{X509ExtensionType.get_critical} returns the value of the
@@ -113,6 +125,7 @@
         self.assertFalse(ext.get_critical())
 
 
+
 class PKeyTests(TestCase, _Python23TestCaseHelper):
     """
     Unit tests for L{OpenSSL.crypto.PKey}.