diff options
author | Stephen Altamirano <stephen@evilrobotstuff.com> | 2011-07-26 22:47:08 -0700 |
---|---|---|
committer | Stephen Altamirano <stephen@evilrobotstuff.com> | 2011-07-26 22:47:08 -0700 |
commit | 78049abac123332123990994b50a70bc789b7514 (patch) | |
tree | 51db18286a42ebe75392eecc3c71da6d69ccf67e /test | |
parent | e6288e2d0751502eee1a44723a36230c12b821f3 (diff) | |
download | mitmproxy-78049abac123332123990994b50a70bc789b7514.tar.gz mitmproxy-78049abac123332123990994b50a70bc789b7514.tar.bz2 mitmproxy-78049abac123332123990994b50a70bc789b7514.zip |
Changes replace logic to function in both Python 2.6.x and 2.7.x
Tests now only assume Python 2.6.x rather than requiring 2.7.x. This does not preclude the use of flags as a kwarg in replace
Diffstat (limited to 'test')
-rw-r--r-- | test/test_proxy.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_proxy.py b/test/test_proxy.py index dacdbcc3..ffd29a73 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -133,7 +133,7 @@ class uRequest(libpry.AutoTree): r.path = "path/foo" r.headers["Foo"] = ["fOo"] r.content = "afoob" - assert r.replace("foo", "boo", flags=re.I) == 4 + assert r.replace("foo(?i)", "boo") == 4 assert r.path == "path/boo" assert not "foo" in r.content assert r.headers["boo"] == ["boo"] @@ -199,7 +199,7 @@ class uResponse(libpry.AutoTree): r = tutils.tresp() r.headers["Foo"] = ["fOo"] r.content = "afoob" - assert r.replace("foo", "boo", flags=re.I) == 3 + assert r.replace("foo(?i)", "boo") == 3 assert not "foo" in r.content assert r.headers["boo"] == ["boo"] |