aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathod/test_language_actions.py
diff options
context:
space:
mode:
authorShadab Zafar <dufferzafar0@gmail.com>2016-05-31 19:59:47 +0530
committerShadab Zafar <dufferzafar0@gmail.com>2016-06-06 00:07:44 +0530
commitbe306c84399a8583362b1744348762927fc5cb55 (patch)
tree0180b0d2374db7bbb95903da251bb563b1674bae /test/pathod/test_language_actions.py
parentef462a05d7422ec099cafdd52810fbb77dbad604 (diff)
downloadmitmproxy-be306c84399a8583362b1744348762927fc5cb55.tar.gz
mitmproxy-be306c84399a8583362b1744348762927fc5cb55.tar.bz2
mitmproxy-be306c84399a8583362b1744348762927fc5cb55.zip
Py3: Use global next() function instead of iterator method
Diffstat (limited to 'test/pathod/test_language_actions.py')
-rw-r--r--test/pathod/test_language_actions.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/pathod/test_language_actions.py b/test/pathod/test_language_actions.py
index 81d2155d..c8721a03 100644
--- a/test/pathod/test_language_actions.py
+++ b/test/pathod/test_language_actions.py
@@ -5,7 +5,7 @@ from pathod import language
def parse_request(s):
- return language.parse_pathoc(s).next()
+ return next(language.parse_pathoc(s))
def test_unique_name():
@@ -16,9 +16,9 @@ def test_unique_name():
class TestDisconnects:
def test_parse_pathod(self):
- a = language.parse_pathod("400:d0").next().actions[0]
+ a = next(language.parse_pathod("400:d0")).actions[0]
assert a.spec() == "d0"
- a = language.parse_pathod("400:dr").next().actions[0]
+ a = next(language.parse_pathod("400:dr")).actions[0]
assert a.spec() == "dr"
def test_at(self):
@@ -42,12 +42,12 @@ class TestDisconnects:
class TestInject:
def test_parse_pathod(self):
- a = language.parse_pathod("400:ir,@100").next().actions[0]
+ a = next(language.parse_pathod("400:ir,@100")).actions[0]
assert a.offset == "r"
assert a.value.datatype == "bytes"
assert a.value.usize == 100
- a = language.parse_pathod("400:ia,@100").next().actions[0]
+ a = next(language.parse_pathod("400:ia,@100")).actions[0]
assert a.offset == "a"
def test_at(self):
@@ -62,7 +62,7 @@ class TestInject:
def test_serve(self):
s = StringIO()
- r = language.parse_pathod("400:i0,'foo'").next()
+ r = next(language.parse_pathod("400:i0,'foo'"))
assert language.serve(r, s, {})
def test_spec(self):
@@ -96,7 +96,7 @@ class TestPauses:
assert v.offset == "a"
def test_request(self):
- r = language.parse_pathod('400:p10,10').next()
+ r = next(language.parse_pathod('400:p10,10'))
assert r.actions[0].spec() == "p10,10"
def test_spec(self):