diff options
author | Thomas Kriechbaumer <Kriechi@users.noreply.github.com> | 2016-06-17 15:21:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-17 15:21:57 +0200 |
commit | 9c6199db9be34fad18eaedb86463333671ae190a (patch) | |
tree | 7a4b871c24193d31f8dc23794b0a37f58c111c92 /test/pathod/test_language_actions.py | |
parent | fcf5dc8728816bae73a175ee021f8a11a1591567 (diff) | |
parent | eb3ed87100ff7c32e5bf040db7eb6ea3d0c06e12 (diff) | |
download | mitmproxy-9c6199db9be34fad18eaedb86463333671ae190a.tar.gz mitmproxy-9c6199db9be34fad18eaedb86463333671ae190a.tar.bz2 mitmproxy-9c6199db9be34fad18eaedb86463333671ae190a.zip |
Merge pull request #1269 from Kriechi/pathod-netlib-http2
move custom HTTP/2 stack from netlib to pathod
Diffstat (limited to 'test/pathod/test_language_actions.py')
-rw-r--r-- | test/pathod/test_language_actions.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/test/pathod/test_language_actions.py b/test/pathod/test_language_actions.py index f12d8105..2b1b6915 100644 --- a/test/pathod/test_language_actions.py +++ b/test/pathod/test_language_actions.py @@ -1,11 +1,10 @@ from six import BytesIO -from pathod.language import actions -from pathod import language +from pathod.language import actions, parse_pathoc, parse_pathod, serve def parse_request(s): - return next(language.parse_pathoc(s)) + return next(parse_pathoc(s)) def test_unique_name(): @@ -16,9 +15,9 @@ def test_unique_name(): class TestDisconnects: def test_parse_pathod(self): - a = next(language.parse_pathod("400:d0")).actions[0] + a = next(parse_pathod("400:d0")).actions[0] assert a.spec() == "d0" - a = next(language.parse_pathod("400:dr")).actions[0] + a = next(parse_pathod("400:dr")).actions[0] assert a.spec() == "dr" def test_at(self): @@ -42,12 +41,12 @@ class TestDisconnects: class TestInject: def test_parse_pathod(self): - a = next(language.parse_pathod("400:ir,@100")).actions[0] + a = next(parse_pathod("400:ir,@100")).actions[0] assert a.offset == "r" assert a.value.datatype == "bytes" assert a.value.usize == 100 - a = next(language.parse_pathod("400:ia,@100")).actions[0] + a = next(parse_pathod("400:ia,@100")).actions[0] assert a.offset == "a" def test_at(self): @@ -62,8 +61,8 @@ class TestInject: def test_serve(self): s = BytesIO() - r = next(language.parse_pathod("400:i0,'foo'")) - assert language.serve(r, s, {}) + r = next(parse_pathod("400:i0,'foo'")) + assert serve(r, s, {}) def test_spec(self): e = actions.InjectAt.expr() @@ -96,7 +95,7 @@ class TestPauses: assert v.offset == "a" def test_request(self): - r = next(language.parse_pathod('400:p10,10')) + r = next(parse_pathod('400:p10,10')) assert r.actions[0].spec() == "p10,10" def test_spec(self): |