Skip to content

Commit

Permalink
Fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
francbartoli committed Oct 12, 2024
1 parent b733d03 commit be37035
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/auth/auth_jwks.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get_jwks(self) -> KeySet:
"""Get cached or new JWKS."""
url = self.config.jwks_uri
logger.info(f"Fetching JSON Web Key Set from {url}")
async with httpx.AsyncClient() as client:
async with httpx.AsyncClient(timeout=30) as client:
response = await client.get(url)
return JsonWebKey.import_key_set(response.json())

Expand Down
5 changes: 4 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ def protected_bearer_schema(create_protected_with_bearer_app):

def get_access_token():
"""Fetch an access token."""
with Client(base_url=cfg.OAUTH2_TOKEN_ENDPOINT) as client:
with Client(
base_url=cfg.OAUTH2_TOKEN_ENDPOINT,
timeout=30,
) as client:
response = client.post(
"/",
headers={
Expand Down

0 comments on commit be37035

Please sign in to comment.