Typing test (#24651)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user