Typing test (#24651)
This commit is contained in:
parent
d2f234757b
commit
7995ff1410
7 changed files with 23 additions and 20 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue