mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
fix tests
This commit is contained in:
parent
d4bd2101b5
commit
0426eccfd8
2
setup.py
2
setup.py
@ -99,7 +99,7 @@ setup(
|
||||
],
|
||||
install_requires=[
|
||||
'netlib>=%s' % version.MINORVERSION,
|
||||
"requests>=2.4.0",
|
||||
"requests>=2.4.1",
|
||||
"Flask>=0.10.1"
|
||||
],
|
||||
extras_require={
|
||||
|
@ -2,7 +2,6 @@ import logging
|
||||
import requests
|
||||
from libpathod import test
|
||||
import tutils
|
||||
from requests.packages.urllib3.exceptions import ProtocolError
|
||||
logging.disable(logging.CRITICAL)
|
||||
|
||||
class TestDaemonManual:
|
||||
@ -11,7 +10,7 @@ class TestDaemonManual:
|
||||
rsp = requests.get("http://localhost:%s/p/202:da"%d.port)
|
||||
assert rsp.ok
|
||||
assert rsp.status_code == 202
|
||||
tutils.raises(ProtocolError, requests.get, "http://localhost:%s/p/202:da"%d.port)
|
||||
tutils.raises(requests.ConnectionError, requests.get, "http://localhost:%s/p/202:da"%d.port)
|
||||
|
||||
def test_startstop_ssl(self):
|
||||
d = test.Daemon(ssl=True)
|
||||
@ -19,7 +18,7 @@ class TestDaemonManual:
|
||||
assert rsp.ok
|
||||
assert rsp.status_code == 202
|
||||
d.shutdown()
|
||||
tutils.raises(ProtocolError, requests.get, "http://localhost:%s/p/202:da"%d.port)
|
||||
tutils.raises(requests.ConnectionError, requests.get, "http://localhost:%s/p/202:da"%d.port)
|
||||
|
||||
def test_startstop_ssl_explicit(self):
|
||||
ssloptions = dict(
|
||||
@ -32,6 +31,6 @@ class TestDaemonManual:
|
||||
assert rsp.ok
|
||||
assert rsp.status_code == 202
|
||||
d.shutdown()
|
||||
tutils.raises(ProtocolError, requests.get, "http://localhost:%s/p/202:da"%d.port)
|
||||
tutils.raises(requests.ConnectionError, requests.get, "http://localhost:%s/p/202:da"%d.port)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user