def test_share_view(self):
        """Test the share view"""

        profiler_patcher = mock.patch('flaskext.gae_mini_profiler.profiler',
                                      spec=True)
        request_patcher = mock.patch('flaskext.gae_mini_profiler.request',
                                     spec=True)

        profiler = profiler_patcher.start()
        request = request_patcher.start()

        try:
            from flaskext.gae_mini_profiler import GAEMiniProfiler

            request_id = mock.Sentinel()
            request.args = {'request_id': request_id}

            app = mock.Mock()
            ext = GAEMiniProfiler(app)
            with mock.patch.object(ext, '_render') as render:
                ext._share_view()

            profiler.RequestStats.get.assert_called_once_with(request_id)
            self.assertTrue(1, render.call_count)
            self.assertEquals(request_id,
                              render.call_args[0][1]['request_id'])
        finally:
            request_patcher.stop()
            profiler_patcher.stop()