def test_before_render_get(self):
        before_data = 'test_before_render_get'

        def fn(self, data):
            return {'before_data': before_data}

        setattr(SimpleModelView, 'before_get_render', fn)
        m = SimpleModel(u'name')
        self.session.add(m)
        self.session.flush()
        response = self.client.get(url_for('SimpleModelView:get', id=m.id))
        assert before_data in response.data.decode('utf-8')
        delattr(SimpleModelView, 'before_get_render')
dataset/ETHPy150Open danielholmstrom/flask-alchemyview/tests/test_view.py/TestSimpleModel.test_before_render_get/original