fix: Added missing tests and rebased fixes #158

This commit is contained in:
Flaper Fesp
2013-08-02 19:23:11 +02:00
parent b4f3865514
commit 5bdfa77581
2 changed files with 18 additions and 1 deletions

View File

@@ -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)

View File

@@ -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)