diff options
Diffstat (limited to 'test/test_flow.py')
-rw-r--r-- | test/test_flow.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/test_flow.py b/test/test_flow.py index b8d1fad3..51b88fff 100644 --- a/test/test_flow.py +++ b/test/test_flow.py @@ -422,7 +422,7 @@ class TestFlow(object): assert not f == f2 f2.error = Error("e2") assert not f == f2 - f.load_state(f2.get_state()) + f.set_state(f2.get_state()) assert f.get_state() == f2.get_state() def test_kill(self): @@ -463,6 +463,11 @@ class TestFlow(object): f.response.content = "\xc2foo" f.replace("foo", u"bar") + def test_replace_no_content(self): + f = tutils.tflow() + f.request.content = CONTENT_MISSING + assert f.replace("foo", "bar") == 0 + def test_replace(self): f = tutils.tflow(resp=True) f.request.headers["foo"] = "foo" @@ -1199,7 +1204,7 @@ class TestError: e2 = Error("bar") assert not e == e2 - e.load_state(e2.get_state()) + e.set_state(e2.get_state()) assert e.get_state() == e2.get_state() e3 = e.copy() @@ -1219,7 +1224,7 @@ class TestClientConnection: assert not c == c2 c2.timestamp_start = 42 - c.load_state(c2.get_state()) + c.set_state(c2.get_state()) assert c.timestamp_start == 42 c3 = c.copy() |