diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-11-11 12:29:34 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-11-11 12:29:34 +0100 |
commit | 8635e00175117d8574b4bea5edc1c43528ddf3e9 (patch) | |
tree | 1be23a6349a8fb81a89f8417b0b9d236d1829639 /test/test_test.py | |
parent | b917b61e6aead4f353ef15838315ecc0df721e29 (diff) | |
parent | 27c7e9e9345bbc458e7efc4093c2074e19011d12 (diff) | |
download | mitmproxy-8635e00175117d8574b4bea5edc1c43528ddf3e9.tar.gz mitmproxy-8635e00175117d8574b4bea5edc1c43528ddf3e9.tar.bz2 mitmproxy-8635e00175117d8574b4bea5edc1c43528ddf3e9.zip |
Merge remote-tracking branch 'origin/master'
Conflicts:
setup.py
Diffstat (limited to 'test/test_test.py')
-rw-r--r-- | test/test_test.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/test/test_test.py b/test/test_test.py index 0a05f1c1..943fb270 100644 --- a/test/test_test.py +++ b/test/test_test.py @@ -4,13 +4,18 @@ from libpathod import test import tutils logging.disable(logging.CRITICAL) + class TestDaemonManual: def test_simple(self): with test.Daemon() as d: rsp = requests.get("http://localhost:%s/p/202:da"%d.port) assert rsp.ok assert rsp.status_code == 202 - tutils.raises(requests.ConnectionError, requests.get, "http://localhost:%s/p/202:da"%d.port) + tutils.raises( + "Connection aborted", + requests.get, + "http://localhost:%s/p/202:da"%d.port + ) def test_startstop_ssl(self): d = test.Daemon(ssl=True) @@ -18,7 +23,11 @@ class TestDaemonManual: assert rsp.ok assert rsp.status_code == 202 d.shutdown() - tutils.raises(requests.ConnectionError, requests.get, "http://localhost:%s/p/202:da"%d.port) + tutils.raises( + "Connection aborted", + requests.get, + "http://localhost:%s/p/202:da"%d.port + ) def test_startstop_ssl_explicit(self): ssloptions = dict( @@ -31,6 +40,9 @@ class TestDaemonManual: assert rsp.ok assert rsp.status_code == 202 d.shutdown() - tutils.raises(requests.ConnectionError, requests.get, "http://localhost:%s/p/202:da"%d.port) - + tutils.raises( + "Connection aborted", + requests.get, + "http://localhost:%s/p/202:da"%d.port + ) |