Typing test (#24651)

This commit is contained in:
Asuka Minato
2025-08-28 10:36:39 +09:00
committed by GitHub
parent d2f234757b
commit 7995ff1410
7 changed files with 23 additions and 20 deletions

View File

@@ -1,9 +1,11 @@
import datetime
import pytest
from libs.datetime_utils import naive_utc_now
def test_naive_utc_now(monkeypatch):
def test_naive_utc_now(monkeypatch: pytest.MonkeyPatch):
tz_aware_utc_now = datetime.datetime.now(tz=datetime.UTC)
def _now_func(tz: datetime.timezone | None) -> datetime.datetime:

View File

@@ -143,7 +143,7 @@ def test_uuidv7_with_custom_timestamp():
assert extracted_timestamp == custom_timestamp # Exact match for integer milliseconds
def test_uuidv7_with_none_timestamp(monkeypatch):
def test_uuidv7_with_none_timestamp(monkeypatch: pytest.MonkeyPatch):
"""Test UUID generation with None timestamp uses current time."""
mock_time = 1609459200
mock_time_func = mock.Mock(return_value=mock_time)