Revision ee0a4a93
Added by koszko over 1 year ago
| test/haketilo_test/server.py | ||
|---|---|---|
| 33 | 33 |
from threading import Thread |
| 34 | 34 |
import traceback |
| 35 | 35 |
|
| 36 |
from selenium.webdriver.common.utils import free_port |
|
| 37 |
|
|
| 36 | 38 |
from .proxy_core import ProxyRequestHandler, ThreadingHTTPServer |
| 37 | 39 |
from .misc_constants import * |
| 38 | 40 |
from .world_wide_library import catalog as internet |
| ... | ... | |
| 99 | 101 |
if resp_body: |
| 100 | 102 |
self.wfile.write(resp_body) |
| 101 | 103 |
|
| 102 |
def do_an_internet(certdir=default_cert_dir, port=default_proxy_port):
|
|
| 104 |
def do_an_internet(certdir=default_cert_dir, port=None):
|
|
| 103 | 105 |
"""Start up the proxy/server""" |
| 106 |
if port is None: |
|
| 107 |
port = free_port() |
|
| 108 |
|
|
| 104 | 109 |
class RequestHijackerWithCertdir(RequestHijacker): |
| 105 | 110 |
def __init__(self, *args, **kwargs): |
| 106 | 111 |
super().__init__(*args, certdir=certdir, **kwargs) |
Also available in: Unified diff
automatically pick up a free port to run the HTTP proxy on
It is now possible to run multiple
make testcommands in parallel (e.g. testing abrowser and librewolf simultaneously after runningconfigurefor each of them in 2 different directories).