blitz_api/tests/utils.py
2021-10-03 10:37:51 +02:00

9 lines
325 B
Python

from app.auth.auth_bearer import JWTBearer
from fastapi.security import HTTPAuthorizationCredentials
def monkeypatch_auth(monkeypatch):
async def fake__call__(self, request):
return HTTPAuthorizationCredentials(scheme="Bearer", credentials="creds")
monkeypatch.setattr(JWTBearer, "__call__", fake__call__)