aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/tools/web/test_app.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/mitmproxy/tools/web/test_app.py b/test/mitmproxy/tools/web/test_app.py
index 8a81e0e0..f6072efb 100644
--- a/test/mitmproxy/tools/web/test_app.py
+++ b/test/mitmproxy/tools/web/test_app.py
@@ -281,7 +281,8 @@ class TestApp(tornado.testing.AsyncHTTPTestCase):
tflow_json = _json.dumps(
app.flow_to_json(tflow.tflow(resp=True, err=True)), indent=4, sort_keys=True
)
- web_root = os.path.join(os.getcwd(), 'web')
+ here = os.path.abspath(os.path.dirname(__file__))
+ web_root = os.path.join(here, os.pardir, os.pardir, os.pardir, os.pardir, 'web')
tflow_path = os.path.join(web_root, 'src/js/__tests__/ducks/_tflow.js')
content = """export default function(){{\n return {tflow_json}\n}}""".format(tflow_json=tflow_json)
with open(tflow_path, 'w') as f: