Danny Navarro  committed dd320b5

test raising when body and app_iter is used with Response

  • Participants
  • Parent commits f875176
  • Branches default

Comments (0)

Files changed (1)

File tests/

     assert res.content_encoding is None
     assert res.body == 'a body'
     res.set_cookie('x', u'foo') # test unicode value
+    assert_raises(TypeError,
+                  Response, app_iter=iter(['a']), body="somebody")
 def test_headers():
     r = Response()
     eq_(r5.body, 'xxxxx')
     eq_(r5.content_length, 5)
 def test_app_iter_range():
     req = Request.blank('/', range=(2,5))
     for app_iter in [
     resp2 = Response.from_file(input)
     eq_(resp.body, resp2.body)
     eq_(resp.headers, resp2.headers)