summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Toivonen <heikki@heikkitoivonen.net>2006-05-24 22:54:03 +0000
committerHeikki Toivonen <heikki@heikkitoivonen.net>2006-05-24 22:54:03 +0000
commit61e96511f2fd05f1877dfbc9db6013eddd3b6fd7 (patch)
tree0fcf0e8fc210d6751ae62b5df9418a1276f1b2a5
parent10976f21364e9888f837f614df279f9d7838e2ce (diff)
downloadm2crypto-61e96511f2fd05f1877dfbc9db6013eddd3b6fd7.tar.gz
Just test that we get the right exception, different OpenSSL
versions and maybe even different operating systems introduce differencies in what exactly is in the exception. git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@443 2715db39-9adf-0310-9c64-84f055769b4b
-rw-r--r--tests/test_ssl.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/test_ssl.py b/tests/test_ssl.py
index 0635994..47f8cce 100644
--- a/tests/test_ssl.py
+++ b/tests/test_ssl.py
@@ -142,14 +142,7 @@ class SSLClientTestCase(unittest.TestCase):
try:
ctx = SSL.Context('sslv23')
s = SSL.Connection(ctx)
- try:
- s.connect(self.srv_addr)
- except SSL.SSLError, e:
- # XXX Not totally sure if this is correct, but SSLv2 handling DID change.
- if m2.OPENSSL_VERSION_NUMBER < 0x90800F:
- self.failUnlessEqual(e[0], 'unsupported protocol')
- else:
- self.failUnlessEqual(e[1], 'Software caused connection abort')
+ self.assertRaises(SSL.SSLError, s.connect, self.srv_addr)
s.close()
finally:
self.stop_server(pid)