File: test_response_body.py

package info (click to toggle)
python-falcon 0.1.8-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 832 kB
  • ctags: 997
  • sloc: python: 4,006; makefile: 39; sh: 16
file content (17 lines) | stat: -rw-r--r-- 361 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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.assertEqual(resp.body, text)