From 3e4bde861cdee3312e1d410dc08f67d8e7c9168c Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Thu, 17 Feb 2022 16:05:20 +0100 Subject: fix test-environment* targets --- test/haketilo_test/__main__.py | 2 +- test/haketilo_test/misc_constants.py | 2 +- test/haketilo_test/server.py | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/haketilo_test/__main__.py b/test/haketilo_test/__main__.py index 7afda55..3664e8c 100644 --- a/test/haketilo_test/__main__.py +++ b/test/haketilo_test/__main__.py @@ -67,7 +67,7 @@ httpd = do_an_internet(certdir, int(port)) driver = firefox_safe_mode(proxy_port=int(port)) if load_haketilo: - driver.install_addon(str(here.parent / 'mozilla-build.zip'), temporary=True) + driver.install_addon(str(Path.cwd() / 'mozilla-build.zip'), temporary=True) driver.get(get_extension_base_url(driver) + 'html/settings.html') print("You can now control the browser through 'driver' object") diff --git a/test/haketilo_test/misc_constants.py b/test/haketilo_test/misc_constants.py index 9cac9dc..ac34f32 100644 --- a/test/haketilo_test/misc_constants.py +++ b/test/haketilo_test/misc_constants.py @@ -48,7 +48,7 @@ with open(Path.cwd() / 'record.conf', 'rt') as conf: default_proxy_host = '127.0.0.1' default_proxy_port = 1337 -default_cert_dir = proj_root / 'test' / 'certs' +default_cert_dir = Path.cwd() / 'certs' default_extension_uuid = 'a1291446-be95-48ad-a4c6-a475e389399b' default_haketilo_id = '{6fe13369-88e9-440f-b837-5012fb3bedec}' diff --git a/test/haketilo_test/server.py b/test/haketilo_test/server.py index 7dc5e9e..0963b5b 100755 --- a/test/haketilo_test/server.py +++ b/test/haketilo_test/server.py @@ -99,8 +99,7 @@ class RequestHijacker(ProxyRequestHandler): if resp_body: self.wfile.write(resp_body) -def do_an_internet(certdir=Path.cwd() / 'certs', - port=default_proxy_port): +def do_an_internet(certdir=default_cert_dir, port=default_proxy_port): """Start up the proxy/server""" class RequestHijackerWithCertdir(RequestHijacker): def __init__(self, *args, **kwargs): -- cgit v1.2.3