diff --git a/falcon/tests/test_hello.py b/falcon/tests/test_hello.py index 59b29a8..728c38a 100644 --- a/falcon/tests/test_hello.py +++ b/falcon/tests/test_hello.py @@ -97,7 +97,7 @@ class TestHelloWorld(testing.TestBase): resp = self.resource.resp content_length = int(self.srmock.headers_dict['Content-Length']) - self.assertEquals(content_length, len(self.resource.sample_unicode)) + self.assertEquals(content_length, len(self.resource.sample_utf8)) self.assertEquals(self.srmock.status, self.resource.sample_status) self.assertEquals(resp.status, self.resource.sample_status) diff --git a/falcon/tests/test_response_body.py b/falcon/tests/test_response_body.py new file mode 100644 index 0000000..1c12ae2 --- /dev/null +++ b/falcon/tests/test_response_body.py @@ -0,0 +1,17 @@ + +import falcon +import falcon.testing as testing + + +class TestResponseBody(testing.TestBase): + + def test_append_body(self): + text = "Hello beautiful world! " + resp = falcon.Response() + resp.body = "" + + for token in text.split(): + resp.body += token + resp.body += " " + + self.assertEquals(resp.body, text)