From f373ac5b6c443d0e633323e39b846fbe78822c2c Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 2 Mar 2014 17:27:24 +1300 Subject: Improve explicit certificate specification - Support cert/key in the same PEM file - Rationalize arguments, expand tests, clean up a bit --- test/test_proxy.py | 9 ++++++--- test/tservers.py | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/test_proxy.py b/test/test_proxy.py index c42d66e7..5ff00290 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -70,9 +70,12 @@ class TestProcessProxyOptions: def test_simple(self): assert self.p() - def test_cert(self): - self.assert_noerr("--cert", tutils.test_data.path("data/testkey.pem")) - self.assert_err("does not exist", "--cert", "nonexistent") + def test_certfile_keyfile(self): + self.assert_noerr("--certfile", tutils.test_data.path("data/testkey.pem")) + self.assert_err("does not exist", "--certfile", "nonexistent") + + self.assert_noerr("--keyfile", tutils.test_data.path("data/testkey.pem")) + self.assert_err("does not exist", "--keyfile", "nonexistent") def test_confdir(self): with tutils.tmpdir() as confdir: diff --git a/test/tservers.py b/test/tservers.py index 812e8921..a0f37c98 100644 --- a/test/tservers.py +++ b/test/tservers.py @@ -128,6 +128,7 @@ class ProxTestBase(object): d["clientcerts"] = tutils.test_data.path("data/clientcert") if cls.certfile: d["certfile"] =tutils.test_data.path("data/testkey.pem") + d["keyfile"] =tutils.test_data.path("data/testkey.pem") return d -- cgit v1.2.3