def test_share_view(self):

        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()
Simple function to extract the current version using regular expressions.
dataset/ETHPy150Open passy/flask-gae-mini-profiler/tests/extension.py/ExtensionTestCase.test_share_view--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/requests-kerberos-0.6.1/setup.py/get_version