diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-06-12 10:39:19 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-06-12 10:39:19 +1200 |
commit | 9bea616441256e07495c5e5fd34f6a6673e05c52 (patch) | |
tree | 3543b01611e1d0e6c69898a7c2948d59077e8d71 /test/pathod | |
parent | c801f81373d5935f60bf950b1f266911a94ecf60 (diff) | |
download | mitmproxy-9bea616441256e07495c5e5fd34f6a6673e05c52.tar.gz mitmproxy-9bea616441256e07495c5e5fd34f6a6673e05c52.tar.bz2 mitmproxy-9bea616441256e07495c5e5fd34f6a6673e05c52.zip |
Be stricter about handling connetcts in the pathoc test suite
Attempt to clear a niggling Appveyor exception buggering up our CI.
Diffstat (limited to 'test/pathod')
-rw-r--r-- | test/pathod/test_pathoc.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/pathod/test_pathoc.py b/test/pathod/test_pathoc.py index dc5011c0..77d4721c 100644 --- a/test/pathod/test_pathoc.py +++ b/test/pathod/test_pathoc.py @@ -83,7 +83,13 @@ class TestDaemon(PathocTestDaemon): def test_ssl_error(self): c = pathoc.Pathoc(("127.0.0.1", self.d.port), ssl=True, fp=None) - tutils.raises("ssl handshake", c.connect) + try: + with c.connect(): + pass + except Exception as e: + assert "SSL" in str(e) + else: + raise AssertionError("No exception raised.") def test_showssl(self): assert "certificate chain" not in self.tval( |