diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-02-01 16:17:22 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-02-02 12:59:01 +0100 |
commit | ec92d7f67e3c5960d9b30e067fb4ed1ae3fc8884 (patch) | |
tree | 22f48c7eab85ee2e58ac8e7127e198155dbeb62f /mitmproxy/test/tutils.py | |
parent | c1bc1ea584d4bb47c1b754dfa7f10ab4dfc380a3 (diff) | |
download | mitmproxy-ec92d7f67e3c5960d9b30e067fb4ed1ae3fc8884.tar.gz mitmproxy-ec92d7f67e3c5960d9b30e067fb4ed1ae3fc8884.tar.bz2 mitmproxy-ec92d7f67e3c5960d9b30e067fb4ed1ae3fc8884.zip |
cleanup test utils
Diffstat (limited to 'mitmproxy/test/tutils.py')
-rw-r--r-- | mitmproxy/test/tutils.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mitmproxy/test/tutils.py b/mitmproxy/test/tutils.py index ae0ce2d8..47756315 100644 --- a/mitmproxy/test/tutils.py +++ b/mitmproxy/test/tutils.py @@ -11,12 +11,7 @@ from mitmproxy.net import tcp from mitmproxy.net import http -def treader(bytes): - """ - Construct a tcp.Read object from bytes. - """ - fp = BytesIO(bytes) - return tcp.Reader(fp) +test_data = data.Data(__name__).push("../../test/") @contextmanager @@ -89,7 +84,12 @@ class RaisesContext: return True -test_data = data.Data(__name__).push("../../test/") +def treader(bytes): + """ + Construct a tcp.Read object from bytes. + """ + fp = BytesIO(bytes) + return tcp.Reader(fp) def treq(**kwargs): |