admin: 信息架构重组 + Settings tab 化 + 待办驱动 Dashboard + 任务历史 #15
@@ -73,7 +73,9 @@ class TestStandingsModel:
|
||||
|
||||
def test_unique_constraint_includes_available_at(self):
|
||||
names = {c.name for c in Standing.__table__.constraints}
|
||||
assert any("available" in n and n.startswith("uq_") for n in names), \
|
||||
# 匿名约束(PK/Check)的 name 是 None,必须先判真值再子串匹配,
|
||||
# 否则 any() 撞上 None 直接 TypeError(集合顺序不定 → flaky)
|
||||
assert any(n and "available" in n and n.startswith("uq_") for n in names), \
|
||||
f"缺少含 available_at 的唯一约束,现有: {names}"
|
||||
|
||||
def test_old_unique_constraint_removed(self):
|
||||
|
||||
Reference in New Issue
Block a user