aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatthew Shao <me@matshao.com>2017-05-21 20:59:19 +0800
committerMatthew Shao <me@matshao.com>2017-05-21 20:59:19 +0800
commit2c38fddea5eae0fe60822ee2fcf2565889f258b9 (patch)
tree80f31eea543d1814c4853b9d02da53c32288ef1e /test
parent55a58c4c6f46e7bbe78d20c31b1ede4a1357ec82 (diff)
downloadmitmproxy-2c38fddea5eae0fe60822ee2fcf2565889f258b9.tar.gz
mitmproxy-2c38fddea5eae0fe60822ee2fcf2565889f258b9.tar.bz2
mitmproxy-2c38fddea5eae0fe60822ee2fcf2565889f258b9.zip
[web] TFlow minor improved.
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: