def test_error_in_generator_callback(self): @self.app.route('/') def test(): yield 1/0 self.assertStatus(500) self.assertInBody('ZeroDivisionError')