title: Disabling @login_required while unit-testing flask with flask-login
body: <p>I am unit testing my flask app which uses the flask-login extension.</p>
  
  <p>I am setting up all my tests like this using webtest:</p>
  
  <pre><code>class TestCase(unittest.TestCase):
  
      def setUp(self):
          app.config['TESTING'] = True
          self.client = webtest.TestApp(app)
  </code></pre>
  
  <p>But when I try to visit urls through self.client.get() which are decorated with @login_required, I get a 401 error with a message that I am not authorized to access the url.</p>
  
  <p>According to the documentation <a href="https://flask-login.readthedocs.org/en/latest/#protecting-views" rel="noreferrer">https://flask-login.readthedocs.org/en/latest/#protecting-views</a>
  and this <a href="https://github.com/maxcountryman/flask-login/pull/104" rel="noreferrer">discussion</a>,
  setting the config value of 'TESTING' to True should disable the login requirements, but that doesn't seem to be working for me.</p>
  
  <p>Any suggestions?</p>