Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
reuvenstr committed Dec 8, 2024
1 parent 5f5e320 commit 33af123
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jwthenticator/tests/test_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
@pytest.fixture
def set_timezone()-> Generator[Callable[[str], None], None, None]:
original_tz = os.environ.get('TZ')
def change_timezone(tz: str) -> None:
os.environ['TZ'] = tz
def change_timezone(time_zone: str) -> None:
os.environ['TZ'] = time_zone
time.tzset() # Update the timezone for the process
yield change_timezone
# Restore the original timezone
Expand Down Expand Up @@ -60,13 +60,13 @@ async def _create_refresh_token(self) -> str:

# Create access token tests
@pytest.mark.asyncio
async def test_create_access_token(self, set_timezone: Callable[[str], None]) -> None:
async def test_create_access_token(self, set_timezone_callback: Callable[[str], None]) -> None:
uuid = uuid4()
time_now = utcnow()
time_now_timestamp = int(time_now.timestamp())
time_plus_some_time = time_now + timedelta(seconds=10)
time_plus_some_time_timestamp = int(time_plus_some_time.timestamp())
set_timezone("America/Los_Angeles")
set_timezone_callback("America/Los_Angeles")
token = await self.token_manager.create_access_token(uuid)
token_data = await self.token_manager.load_access_token(token)
assert token_data.identifier == uuid
Expand Down

0 comments on commit 33af123

Please sign in to comment.