-
-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
314dcfd
commit 4df8fd5
Showing
1 changed file
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
from __future__ import annotations | ||
|
||
import secrets | ||
import sys | ||
from dataclasses import asdict | ||
from datetime import datetime, timedelta, timezone | ||
from typing import Any, Dict, Optional | ||
from typing import Any | ||
from uuid import uuid4 | ||
|
||
import jwt | ||
|
@@ -23,10 +25,10 @@ | |
@pytest.mark.parametrize("token_extras", [None, {"email": "[email protected]"}]) | ||
def test_token( | ||
algorithm: str, | ||
token_issuer: Optional[str], | ||
token_audience: Optional[str], | ||
token_unique_jwt_id: Optional[str], | ||
token_extras: Optional[Dict[str, Any]], | ||
token_issuer: str | None, | ||
token_audience: str | None, | ||
token_unique_jwt_id: str | None, | ||
token_extras: dict[str, Any] | None, | ||
) -> None: | ||
token_secret = secrets.token_hex() | ||
token = Token( | ||
|