diff options
Diffstat (limited to 'test/test_flow.py')
-rw-r--r-- | test/test_flow.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_flow.py b/test/test_flow.py index 365b6c58..ba276248 100644 --- a/test/test_flow.py +++ b/test/test_flow.py @@ -219,6 +219,21 @@ class uFlow(libpry.AutoTree): f = flow.Flow(None) f.request = tutils.treq() + def test_replace(self): + f = tutils.tflow_full() + f.request.headers["foo"] = ["foo"] + f.request.content = "afoob" + + f.response.headers["foo"] = ["foo"] + f.response.content = "afoob" + + assert f.replace("foo", "bar") == 6 + + assert f.request.headers["bar"] == ["bar"] + assert f.request.content == "abarb" + assert f.response.headers["bar"] == ["bar"] + assert f.response.content == "abarb" + class uState(libpry.AutoTree): def test_backup(self): |