fix(cli): use datetime() for CodeLink.added_at in tests (mypy strict)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tarik Moussa
2026-06-05 07:34:51 +02:00
parent 2acb2ee213
commit 4c177a0d29

View File

@@ -6,6 +6,7 @@ so the suite runs offline without real API calls.
from __future__ import annotations from __future__ import annotations
from datetime import datetime
from typing import Any from typing import Any
from unittest.mock import MagicMock, patch from unittest.mock import MagicMock, patch
@@ -193,7 +194,7 @@ class TestProvAddLink:
paper_id="2301.07041", paper_id="2301.07041",
role="core_algorithm", role="core_algorithm",
note="Primary reference", note="Primary reference",
added_at="2023-01-01T00:00:00Z", added_at=datetime(2023, 1, 1),
) )
mock_add.return_value = mock_link mock_add.return_value = mock_link
@@ -231,7 +232,7 @@ class TestProvLinks:
paper_id="2301.07041", paper_id="2301.07041",
role="core", role="core",
note=None, note=None,
added_at="2023-01-01T00:00:00Z", added_at=datetime(2023, 1, 1),
), ),
CodeLink( CodeLink(
id=2, id=2,
@@ -239,7 +240,7 @@ class TestProvLinks:
paper_id="2301.07042", paper_id="2301.07042",
role="utility", role="utility",
note=None, note=None,
added_at="2023-01-02T00:00:00Z", added_at=datetime(2023, 1, 2),
), ),
] ]