aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/proxy/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'test/mitmproxy/proxy/protocol')
-rw-r--r--test/mitmproxy/proxy/protocol/test_http2.py17
-rw-r--r--test/mitmproxy/proxy/protocol/test_websocket.py7
2 files changed, 10 insertions, 14 deletions
diff --git a/test/mitmproxy/proxy/protocol/test_http2.py b/test/mitmproxy/proxy/protocol/test_http2.py
index 583e6e27..5e6fa701 100644
--- a/test/mitmproxy/proxy/protocol/test_http2.py
+++ b/test/mitmproxy/proxy/protocol/test_http2.py
@@ -8,7 +8,6 @@ import pytest
import h2
from mitmproxy import options
-from mitmproxy.proxy.config import ProxyConfig
import mitmproxy.net
from ...net import tservers as net_tservers
@@ -89,10 +88,8 @@ class _Http2TestBase:
@classmethod
def setup_class(cls):
- opts = cls.get_options()
- cls.config = ProxyConfig(opts)
-
- tmaster = tservers.TestMaster(opts, cls.config)
+ cls.options = cls.get_options()
+ tmaster = tservers.TestMaster(cls.options)
cls.proxy = tservers.ProxyThread(tmaster)
cls.proxy.start()
@@ -319,7 +316,7 @@ class TestRequestWithPriority(_Http2Test):
(False, (None, None, None), (None, None, None)),
])
def test_request_with_priority(self, http2_priority_enabled, priority, expected_priority):
- self.config.options.http2_priority = http2_priority_enabled
+ self.options.http2_priority = http2_priority_enabled
h2_conn = self.setup_connection()
@@ -397,7 +394,7 @@ class TestPriority(_Http2Test):
(False, (True, 42424242, 42), []),
])
def test_priority(self, prioritize_before, http2_priority_enabled, priority, expected_priority):
- self.config.options.http2_priority = http2_priority_enabled
+ self.options.http2_priority = http2_priority_enabled
self.__class__.priority_data = []
h2_conn = self.setup_connection()
@@ -508,8 +505,10 @@ class TestBodySizeLimit(_Http2Test):
return True
def test_body_size_limit(self):
- self.config.options.body_size_limit = "20"
- self.config.options._processed["body_size_limit"] = 20
+ self.options.body_size_limit = "20"
+
+ # FIXME: This should not be required?
+ self.options._processed["body_size_limit"] = 20
h2_conn = self.setup_connection()
diff --git a/test/mitmproxy/proxy/protocol/test_websocket.py b/test/mitmproxy/proxy/protocol/test_websocket.py
index 58857f92..460d85f8 100644
--- a/test/mitmproxy/proxy/protocol/test_websocket.py
+++ b/test/mitmproxy/proxy/protocol/test_websocket.py
@@ -7,7 +7,6 @@ from mitmproxy import options
from mitmproxy import exceptions
from mitmproxy.http import HTTPFlow
from mitmproxy.websocket import WebSocketFlow
-from mitmproxy.proxy.config import ProxyConfig
from mitmproxy.net import tcp
from mitmproxy.net import http
@@ -49,10 +48,8 @@ class _WebSocketTestBase:
@classmethod
def setup_class(cls):
- opts = cls.get_options()
- cls.config = ProxyConfig(opts)
-
- tmaster = tservers.TestMaster(opts, cls.config)
+ cls.options = cls.get_options()
+ tmaster = tservers.TestMaster(cls.options)
cls.proxy = tservers.ProxyThread(tmaster)
cls.proxy.start()