diff options
| author | Aldo Cortesi <aldo@corte.si> | 2014-03-10 17:24:05 +1300 |
|---|---|---|
| committer | Aldo Cortesi <aldo@corte.si> | 2014-03-10 17:24:05 +1300 |
| commit | 554deee222fa4d2100b93becc4dd06f7342e3694 (patch) | |
| tree | 8acbf873630193e7bc34185f3a243e1aab408869 /test/tservers.py | |
| parent | 2e50b1073538730fc5bd6369e2cb8176874f2f03 (diff) | |
| parent | dd3aedca01a61f2fe33d009320f7fe656f1fc671 (diff) | |
| download | mitmproxy-554deee222fa4d2100b93becc4dd06f7342e3694.tar.gz mitmproxy-554deee222fa4d2100b93becc4dd06f7342e3694.tar.bz2 mitmproxy-554deee222fa4d2100b93becc4dd06f7342e3694.zip | |
Merge pull request #233 from mitmproxy/untangle_circular_dependencies
Untangle circular dependencies
Diffstat (limited to 'test/tservers.py')
| -rw-r--r-- | test/tservers.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/tservers.py b/test/tservers.py index cf9b3f73..bfafc8cd 100644 --- a/test/tservers.py +++ b/test/tservers.py @@ -2,8 +2,10 @@ import os.path import threading, Queue import shutil, tempfile import flask +from libmproxy.proxy.config import ProxyConfig +from libmproxy.proxy.server import ProxyServer import libpathod.test, libpathod.pathoc -from libmproxy import proxy, flow, controller +from libmproxy import flow, controller from libmproxy.cmdline import APP_HOST, APP_PORT import tutils @@ -24,7 +26,7 @@ def errapp(environ, start_response): class TestMaster(flow.FlowMaster): def __init__(self, config): - s = proxy.ProxyServer(config, 0) + s = ProxyServer(config, 0) state = flow.State() flow.FlowMaster.__init__(self, s, state) self.apps.add(testapp, "testapp", 80) @@ -84,7 +86,7 @@ class ProxTestBase(object): cls.server2 = libpathod.test.Daemon(ssl=cls.ssl, ssloptions=cls.ssloptions) pconf = cls.get_proxy_config() cls.confdir = os.path.join(tempfile.gettempdir(), "mitmproxy") - config = proxy.ProxyConfig( + config = ProxyConfig( no_upstream_cert = cls.no_upstream_cert, confdir = cls.confdir, authenticator = cls.authenticator, @@ -256,7 +258,7 @@ class ChainProxTest(ProxTestBase): Chain n instances of mitmproxy in a row - because we can. """ n = 2 - chain_config = [lambda: proxy.ProxyConfig( + chain_config = [lambda: ProxyConfig( )] * n @classmethod def setupAll(cls): |
