test(pool): 修复测试用例中硬编码历史日期导致租约过期判定的问题

This commit is contained in:
yml2213
2026-10-08 11:41:32 +08:00
parent 077f14ef23
commit 578fb08dab
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ from web.backend.models import (
from web.backend.services import account_pool as pool
from web.backend.services.automation.jobs import account_lease_reaper as reaper
NOW = datetime(2026, 10, 7, 12, 0, 0, tzinfo=UTC)
NOW = datetime.now(UTC).replace(microsecond=0)
class _ReaperBase:
+1 -1
View File
@@ -19,7 +19,7 @@ from tests.support.db import get_test_engine, make_test_session
from web.backend.models import Account, AccountEvent, AccountLease, DouyuTask, User
from web.backend.services import account_pool as pool
NOW = datetime(2026, 10, 7, 10, 0, 0, tzinfo=UTC)
NOW = datetime.now(UTC).replace(microsecond=0)
COMMODITY = "20260120QYOOB_bag10"