perf(account-check): 优化账号检测首屏加载
This commit is contained in:
@@ -161,6 +161,22 @@ def test_protection_target_reports_ck_health_and_shortage(db):
|
||||
}
|
||||
|
||||
|
||||
def test_protection_target_counts_missing_cookie_without_full_account_load(db):
|
||||
account = _account("protection-no-cookie")
|
||||
account.cookie = ""
|
||||
db.add(account)
|
||||
db.flush()
|
||||
db.add(_presale_task(account))
|
||||
db.add(_health_job())
|
||||
db.commit()
|
||||
|
||||
rows = evaluate_protection_targets(db, now=NOW)
|
||||
presale = next(row for row in rows if row["group_key"] == "presale_bound")
|
||||
|
||||
assert presale["bound_count"] == 1
|
||||
assert presale["without_cookie"] == 1
|
||||
|
||||
|
||||
def test_ck_health_probes_protected_account_at_its_shorter_interval_first(db):
|
||||
protected = _account(
|
||||
"protection-due",
|
||||
|
||||
Reference in New Issue
Block a user