diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-03-03 16:55:43 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-03-03 16:55:43 +0100 |
commit | 3f98071ac5d8ffa722b2cf9c74c9c38bf413f059 (patch) | |
tree | 494c4af6cfc996d6acd764025bb78f1a1598d5c9 /gnu/packages/patches/python-pyopenssl-skip-network-test.patch | |
parent | 0a77fdf4b8732598e341a6793503ea4847e0c760 (diff) | |
parent | 2bb12f5a68f6547b3de295c22c2886aaa0415e47 (diff) | |
download | guix-3f98071ac5d8ffa722b2cf9c74c9c38bf413f059.tar guix-3f98071ac5d8ffa722b2cf9c74c9c38bf413f059.tar.gz |
Merge branch 'python-tests'
Diffstat (limited to 'gnu/packages/patches/python-pyopenssl-skip-network-test.patch')
-rw-r--r-- | gnu/packages/patches/python-pyopenssl-skip-network-test.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-pyopenssl-skip-network-test.patch b/gnu/packages/patches/python-pyopenssl-skip-network-test.patch new file mode 100644 index 0000000000..a24eaf69a0 --- /dev/null +++ b/gnu/packages/patches/python-pyopenssl-skip-network-test.patch @@ -0,0 +1,50 @@ +This test tries connecting to an external server which is not supported +in the build environment. See discussion at: + +https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00650.html + +diff --git a/tests/test_ssl.py b/tests/test_ssl.py +index ee849fd..60048b8 100644 +--- a/tests/test_ssl.py ++++ b/tests/test_ssl.py +@@ -1180,40 +1180,6 @@ class ContextTests(TestCase, _LoopbackMixin): + TypeError, context.load_verify_locations, None, None, None + ) + +- @pytest.mark.skipif( +- platform == "win32", +- reason="set_default_verify_paths appears not to work on Windows. " +- "See LP#404343 and LP#404344." +- ) +- def test_set_default_verify_paths(self): +- """ +- :py:obj:`Context.set_default_verify_paths` causes the +- platform-specific CA certificate locations to be used for +- verification purposes. +- """ +- # Testing this requires a server with a certificate signed by one +- # of the CAs in the platform CA location. Getting one of those +- # costs money. Fortunately (or unfortunately, depending on your +- # perspective), it's easy to think of a public server on the +- # internet which has such a certificate. Connecting to the network +- # in a unit test is bad, but it's the only way I can think of to +- # really test this. -exarkun +- +- # Arg, verisign.com doesn't speak anything newer than TLS 1.0 +- context = Context(SSLv23_METHOD) +- context.set_default_verify_paths() +- context.set_verify( +- VERIFY_PEER, +- lambda conn, cert, errno, depth, preverify_ok: preverify_ok) +- +- client = socket() +- client.connect(("encrypted.google.com", 443)) +- clientSSL = Connection(context, client) +- clientSSL.set_connect_state() +- clientSSL.do_handshake() +- clientSSL.send(b"GET / HTTP/1.0\r\n\r\n") +- self.assertTrue(clientSSL.recv(1024)) +- + def test_set_default_verify_paths_signature(self): + """ + :py:obj:`Context.set_default_verify_paths` takes no arguments and |