diff options
author | Aldo Cortesi <aldo@corte.si> | 2016-06-12 11:35:20 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-12 11:35:20 +1200 |
commit | e0d6434b27ed16805a2b306f85fd9de0b7971574 (patch) | |
tree | 83934cad2a5918fd7b22a7236985356dfc9cced3 /test/pathod/test_pathoc.py | |
parent | 1d4403096393369e0a8038ad79434ac26b503de3 (diff) | |
parent | e58a2bf0956c6916ebba2477df0320b554c139e2 (diff) | |
download | mitmproxy-e0d6434b27ed16805a2b306f85fd9de0b7971574.tar.gz mitmproxy-e0d6434b27ed16805a2b306f85fd9de0b7971574.tar.bz2 mitmproxy-e0d6434b27ed16805a2b306f85fd9de0b7971574.zip |
Merge pull request #1247 from cortesi/appveyor
Be stricter about handling connetcts in the pathoc test suite
Diffstat (limited to 'test/pathod/test_pathoc.py')
-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( |