From 78049abac123332123990994b50a70bc789b7514 Mon Sep 17 00:00:00 2001 From: Stephen Altamirano Date: Tue, 26 Jul 2011 22:47:08 -0700 Subject: 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 --- test/test_proxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') 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"] -- cgit v1.2.3