fix: Added missing tests and rebased fixes #158
This commit is contained in:
@@ -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)
|
||||
|
||||
17
falcon/tests/test_response_body.py
Normal file
17
falcon/tests/test_response_body.py
Normal 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)
|
||||
Reference in New Issue
Block a user