Commits

Danny Navarro committed dd320b5

test raising when body and app_iter is used with Response

Comments (0)

Files changed (1)

tests/test_response.py

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