title: How to skip/block the before_request call in pytest for Python flask application?
body: <p>I have a sample flask application as below</p>
  <pre><code>from flask import Flask
  
  app = Flask(__name__)
  
  @app.before_request()
  def before_request():
     # Something
     if true
         return True
     else
         return False 
  
  @app.route(&quot;/&quot;)
  def index():
      return &quot;Hello World!&quot;
  </code></pre>
  <p>Also I have a pytest for this</p>
  <pre><code>@pytest.fixture
  def client():
      tester = app.test_client()
      yield tester
  
  def test_index():
     response = client.get('/')
     assert response.status_code == 200
  </code></pre>
  <p>I want to write the test cases for my application.</p>
  <p>Whenever I try to test the index ie / or any  endpoint it will goto before_request first  that it was my application design</p>
  <p>Is there a way to skip the before_request in pytest?</p>
  <p>So that i can test my functionality whether its working properly or not.</p>