def test_httpresponse_in_generator_callback(self): @self.app.route('/') def test(): yield bottle.HTTPResponse('test') self.assertBody('test')