title: How to unit test view_func in url rule?
body: <p>I have the following routing url rule defined and would like to test it.</p>
  
  <pre><code>app.add_url_rule('/api/v1.0/worker/bbc-stage-0', 'stage0', view_func=BBCStage0TaskView.as_view('bbc_stage0_taskview'))
  </code></pre>
  
  <p>The following tests if the path is correct:</p>
  
  <pre><code>def test_url_to_view_stage0_exists(self):
          self.assertEqual(api.app.url_map._rules_by_endpoint['stage0'][0].rule, '/api/v1.0/worker/bbc-stage-0')
  </code></pre>
  
  <p>I haven't found a way to test if <code>view_func</code> is pointing to the right class.  Is there a way to test that?</p>