title: Mock a token for flask unit tests - firebase-admin-python SDK
body: <p>I am using the firebase-admin-python SDK to handle authentication between an iOS app and a flask backend (python). This is my backend authentication endpoint, following <a href="https://firebase.google.com/docs/auth/admin/verify-id-tokens" rel="nofollow noreferrer">the firebase guide</a>:</p>
  
  <pre><code>from flask import request
  from firebase_admin import auth
  
  
  def get():
      """accessed via '/api/authtoken' """
      try:
          fir_token = request.headers["Authorization"]
          decoded_token = auth.verify_id_token(fir_token)
          fir_auth_id = decoded_token["uid"]
      except:
          ...
  
  </code></pre>
  
  <p>How do I mock the fir_token for a unit test? How do I also mock <code>auth.verify_id_token</code> such that I don't need to actually connect to the firebase server?</p>