From 5ab9f344562f1b095a6ba1b6acd16dd7d2178909 Mon Sep 17 00:00:00 2001 From: Jean-Daniel Dupas Date: Mon, 8 Jul 2019 17:09:04 +0200 Subject: [PATCH] Stop trying to guess the error content. There is a least 2 different messages in 3 different functions depending OpenSSL release. --- tests/test_ssl.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tests/test_ssl.py b/tests/test_ssl.py index 2cec84e1c..8a07ed27d 100644 --- a/tests/test_ssl.py +++ b/tests/test_ssl.py @@ -490,7 +490,8 @@ def test_set_sigalgs_list_invalid_name(self, context): def test_set_sigalgs_list_not_supported(self): """ If no signature algorithms supported by the server are set, the handshake - fails with a `"no suitable signature algorithm"` reason string. + fails with a `"no suitable signature algorithm"` reason string, + or 'no shared cipher' on older OpenSSL releases. """ def make_client(socket): @@ -500,17 +501,8 @@ def make_client(socket): c.set_connect_state() return c - with pytest.raises(Error) as excinfo: + with pytest.raises(Error): loopback(client_factory=make_client) - assert excinfo.value.args == ( - [ - ( - 'SSL routines', - 'tls_choose_sigalg', - 'no suitable signature algorithm', - ), - ], - ) def test_get_sigalgs(self): """