aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/test_protocol_http2.py6
-rw-r--r--test/mitmproxy/test_proxy.py26
-rw-r--r--test/mitmproxy/test_server.py5
3 files changed, 21 insertions, 16 deletions
diff --git a/test/mitmproxy/test_protocol_http2.py b/test/mitmproxy/test_protocol_http2.py
index f0fa9a40..873c89c3 100644
--- a/test/mitmproxy/test_protocol_http2.py
+++ b/test/mitmproxy/test_protocol_http2.py
@@ -849,15 +849,15 @@ class TestMaxConcurrentStreams(_Http2Test):
def test_max_concurrent_streams(self):
client, h2_conn = self._setup_connection()
new_streams = [1, 3, 5, 7, 9, 11]
- for id in new_streams:
+ for stream_id in new_streams:
# this will exceed MAX_CONCURRENT_STREAMS on the server connection
# and cause mitmproxy to throttle stream creation to the server
- self._send_request(client.wfile, h2_conn, stream_id=id, headers=[
+ self._send_request(client.wfile, h2_conn, stream_id=stream_id, headers=[
(':authority', "127.0.0.1:{}".format(self.server.server.address.port)),
(':method', 'GET'),
(':scheme', 'https'),
(':path', '/'),
- ('X-Stream-ID', str(id)),
+ ('X-Stream-ID', str(stream_id)),
])
ended_streams = 0
diff --git a/test/mitmproxy/test_proxy.py b/test/mitmproxy/test_proxy.py
index 84838018..f7c64e50 100644
--- a/test/mitmproxy/test_proxy.py
+++ b/test/mitmproxy/test_proxy.py
@@ -85,22 +85,22 @@ class TestProcessProxyOptions:
@mock.patch("mitmproxy.platform.resolver")
def test_modes(self, _):
- # self.assert_noerr("-R", "http://localhost")
- # self.assert_err("expected one argument", "-R")
- # self.assert_err("Invalid server specification", "-R", "reverse")
- #
- # self.assert_noerr("-T")
- #
- # self.assert_noerr("-U", "http://localhost")
- # self.assert_err("expected one argument", "-U")
- # self.assert_err("Invalid server specification", "-U", "upstream")
- #
- # self.assert_noerr("--upstream-auth", "test:test")
- # self.assert_err("expected one argument", "--upstream-auth")
+ self.assert_noerr("-R", "http://localhost")
+ self.assert_err("expected one argument", "-R")
+ self.assert_err("Invalid server specification", "-R", "reverse")
+
+ self.assert_noerr("-T")
+
+ self.assert_noerr("-U", "http://localhost")
+ self.assert_err("expected one argument", "-U")
+ self.assert_err("Invalid server specification", "-U", "upstream")
+
+ self.assert_noerr("--upstream-auth", "test:test")
+ self.assert_err("expected one argument", "--upstream-auth")
self.assert_err(
"Invalid upstream auth specification", "--upstream-auth", "test"
)
- # self.assert_err("mutually exclusive", "-R", "http://localhost", "-T")
+ self.assert_err("mutually exclusive", "-R", "http://localhost", "-T")
def test_socks_auth(self):
self.assert_err(
diff --git a/test/mitmproxy/test_server.py b/test/mitmproxy/test_server.py
index 78a97dc3..e0a8da47 100644
--- a/test/mitmproxy/test_server.py
+++ b/test/mitmproxy/test_server.py
@@ -472,6 +472,11 @@ class TestReverse(tservers.ReverseProxyTest, CommonMixin, TcpMixin):
reverse = True
+class TestReverseSSL(tservers.ReverseProxyTest, CommonMixin, TcpMixin):
+ reverse = True
+ ssl = True
+
+
class TestSocks5(tservers.SocksModeTest):
def test_simple(self):