From 47e16955122a4ae99f2f74b34d3dd42490687f2b Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 22 Jul 2011 20:52:13 +1200 Subject: Also replace strings path for requests. --- test/test_proxy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_proxy.py b/test/test_proxy.py index a7627c1b..dacdbcc3 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -130,9 +130,11 @@ class uRequest(libpry.AutoTree): def test_replace(self): r = tutils.treq() + r.path = "path/foo" r.headers["Foo"] = ["fOo"] r.content = "afoob" - assert r.replace("foo", "boo", flags=re.I) == 3 + assert r.replace("foo", "boo", flags=re.I) == 4 + assert r.path == "path/boo" assert not "foo" in r.content assert r.headers["boo"] == ["boo"] -- cgit v1.2.3