fix(web): align trend ranges, next runs and preview task records
This commit is contained in:
1 parent
19572171b8
commit
257fbe009b
7 files changed
+139
-10
No files matched your search
@@ -142,6 +142,10 @@ def test_video_detail_and_trend():
|
||||
assert trend["available"] is True
|
||||
assert len(trend["points"]) == 3
|
||||
|
||||
# 请求区间早于首次快照时,从首次快照开始,不制造空白历史
|
||||
wide = q.video_trend(101, days=30)
|
||||
assert wide["dates"] == list(DATES)
|
||||
|
||||
# 删除中间一天,折线在缺失日期应为 None,而不是插值
|
||||
db.write(lambda conn: conn.execute(
|
||||
"DELETE FROM snapshot WHERE aid=101 AND stat_date=?",
|
||||
@@ -204,6 +208,8 @@ def test_fans_candidates_system_and_export():
|
||||
assert fans["delta_7d"] is None
|
||||
assert fans["delta_cum"] == 20
|
||||
assert fans["options"][0]["mid"] == 37754047
|
||||
wide = q.fans(days=30)
|
||||
assert wide["dates"] == list(DATES)
|
||||
|
||||
candidates = q.candidates()
|
||||
assert candidates["total"] == 2
|
||||
@@ -220,6 +226,8 @@ def test_fans_candidates_system_and_export():
|
||||
assert system["errors"] == []
|
||||
assert system["preview"] is False
|
||||
assert system["next_runs"]["snapshot"] > 0
|
||||
assert system["next_runs"]["folder_sync"] > FIXED_NOW
|
||||
assert system["next_runs"]["discover"] > FIXED_NOW
|
||||
|
||||
exported = q.export_videos(sort="view")
|
||||
assert exported["total"] == 3
|
||||
|
||||
Reference in new issue
Block a user