diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-11-02 09:44:18 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-11-02 09:44:18 +1300 |
commit | c55e8d8f62b34e45ecdd4f7dd09ed2f0b710c335 (patch) | |
tree | 16af1688bda790d92984c70041a80e0c46f6d60d /mitmproxy/test/tutils.py | |
parent | fc7606bd989145ce6c24e4120bfedfeb1a7bf746 (diff) | |
download | mitmproxy-c55e8d8f62b34e45ecdd4f7dd09ed2f0b710c335.tar.gz mitmproxy-c55e8d8f62b34e45ecdd4f7dd09ed2f0b710c335.tar.bz2 mitmproxy-c55e8d8f62b34e45ecdd4f7dd09ed2f0b710c335.zip |
tests: clean up test/mitmproxy/tutils.py
Remove aliases, use mitmproxy/test/tutils instead.
Diffstat (limited to 'mitmproxy/test/tutils.py')
-rw-r--r-- | mitmproxy/test/tutils.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mitmproxy/test/tutils.py b/mitmproxy/test/tutils.py index e925b282..f5cec1b1 100644 --- a/mitmproxy/test/tutils.py +++ b/mitmproxy/test/tutils.py @@ -20,6 +20,14 @@ def treader(bytes): @contextmanager +def chdir(dir): + orig_dir = os.getcwd() + os.chdir(dir) + yield + os.chdir(orig_dir) + + +@contextmanager def tmpdir(*args, **kwargs): orig_workdir = os.getcwd() temp_workdir = tempfile.mkdtemp(*args, **kwargs) @@ -89,7 +97,7 @@ class RaisesContext: return True -test_data = data.Data(__name__).push("../../test/mitmproxy/net") +test_data = data.Data(__name__).push("../../test/") def treq(**kwargs): |