From 11cc48ca255bb71886d85aeee7df941ae1bcafba Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 13 May 2013 09:08:24 +1200 Subject: [PATCH] Adapt for new request_client_cert option in netlib. --- test/test_server.py | 3 ++- test/tservers.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/test_server.py b/test/test_server.py index 6a88578ca..079ed8ce1 100644 --- a/test/test_server.py +++ b/test/test_server.py @@ -1,7 +1,7 @@ import socket, time import mock from netlib import tcp, http_auth, http -from libpathod import pathoc +from libpathod import pathoc, pathod import tutils, tservers from libmproxy import flow, proxy @@ -173,6 +173,7 @@ class TestHTTPConnectSSLError(tservers.HTTPProxTest): class TestHTTPS(tservers.HTTPProxTest, CommonMixin): ssl = True + ssloptions = pathod.SSLOptions(request_client_cert=True) clientcerts = True def test_clientcert(self): f = self.pathod("304") diff --git a/test/tservers.py b/test/tservers.py index 91ce4dc01..1197fb69e 100644 --- a/test/tservers.py +++ b/test/tservers.py @@ -69,6 +69,7 @@ class ProxyThread(threading.Thread): class ProxTestBase: # Test Configuration ssl = None + ssloptions = False clientcerts = False certfile = None no_upstream_cert = False @@ -77,8 +78,8 @@ class ProxTestBase: @classmethod def setupAll(cls): cls.tqueue = Queue.Queue() - cls.server = libpathod.test.Daemon(ssl=cls.ssl) - cls.server2 = libpathod.test.Daemon(ssl=cls.ssl) + cls.server = libpathod.test.Daemon(ssl=cls.ssl, ssloptions=cls.ssloptions) + cls.server2 = libpathod.test.Daemon(ssl=cls.ssl, ssloptions=cls.ssloptions) pconf = cls.get_proxy_config() config = proxy.ProxyConfig( no_upstream_cert = cls.no_upstream_cert,