Permalink
Browse files

Update tests match the exceptions PyOpenSSL-0.14 will raise. Seems th…

…eir new backend will always raise SecurityError for all inputs (pyca/pyopenssl@6037d07)
  • Loading branch information...
1 parent 7c640d3 commit 32ef044e9b41a6b55bc6a392722b2d9783f7551d @ionelmc ionelmc committed Mar 1, 2014
Showing with 2 additions and 2 deletions.
  1. +1 −1 celery/tests/security/test_certificate.py
  2. +1 −1 celery/tests/security/test_key.py
@@ -16,7 +16,7 @@ def test_valid_certificate(self):
Certificate(CERT2)
def test_invalid_certificate(self):
- self.assertRaises(TypeError, Certificate, None)
+ self.assertRaises((SecurityError, TypeError), Certificate, None)
self.assertRaises(SecurityError, Certificate, '')
self.assertRaises(SecurityError, Certificate, 'foo')
self.assertRaises(SecurityError, Certificate, CERT1[:20] + CERT1[21:])
@@ -14,7 +14,7 @@ def test_valid_private_key(self):
PrivateKey(KEY2)
def test_invalid_private_key(self):
- self.assertRaises(TypeError, PrivateKey, None)
+ self.assertRaises((SecurityError, TypeError), PrivateKey, None)
self.assertRaises(SecurityError, PrivateKey, '')
self.assertRaises(SecurityError, PrivateKey, 'foo')
self.assertRaises(SecurityError, PrivateKey, KEY1[:20] + KEY1[21:])

0 comments on commit 32ef044

Please sign in to comment.