diff options
Diffstat (limited to 'test/netlib/http/test_message.py')
-rw-r--r-- | test/netlib/http/test_message.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/netlib/http/test_message.py b/test/netlib/http/test_message.py index 12e4706c..df66ef6e 100644 --- a/test/netlib/http/test_message.py +++ b/test/netlib/http/test_message.py @@ -99,6 +99,15 @@ class TestMessage(object): def test_http_version(self): _test_decoded_attr(tresp(), "http_version") + def test_replace(self): + r = tresp() + r.content = b"foofootoo" + r.replace(b"foo","gg") + assert r.content == b"ggggtoo" + + r.content = b"foofootoo" + r.replace(b"foo","gg",count=1) + assert r.content == b"ggfootoo" class TestMessageContentEncoding(object): def test_simple(self): |