feat(fulfillment): 增加账号商品能力索引与生命周期事件
This commit is contained in:
@@ -485,6 +485,15 @@ class TestOverviewTaskTypeWiring:
|
||||
.all()
|
||||
)
|
||||
assert len(created) == len(accs)
|
||||
started_events = (
|
||||
session.query(AccountEvent)
|
||||
.filter(AccountEvent.event_type == "task_started")
|
||||
.all()
|
||||
)
|
||||
assert len(started_events) == len(accs)
|
||||
assert {event.account_id for event in started_events} == {
|
||||
account.id for account in accs
|
||||
}
|
||||
finally:
|
||||
session.close()
|
||||
|
||||
@@ -1113,6 +1122,8 @@ class TestOfficialExchangeBecomesAccountEvent:
|
||||
assert event.occurred_at.year == 2026
|
||||
assert event.occurred_at.month == 8 # 1788054985 → 2026-08-30 前后
|
||||
assert event.amount == -1280
|
||||
assert event.subject_type == "commodity"
|
||||
assert event.subject_key == "C1"
|
||||
assert event.detail["source"] == "official_sync"
|
||||
assert event.source == "official_sync"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user