初始化提交
This commit is contained in:
commit
887c1f449e
963 files changed
+166869
No files matched your search
@@ -0,0 +1,21 @@
|
||||
"""测试 Goal ORM 模型新增字段。"""
|
||||
|
||||
from app.models.governance import Goal
|
||||
|
||||
|
||||
def test_goal_has_character_id():
|
||||
"""Goal 模型新增 character_id 字段。"""
|
||||
assert hasattr(Goal, "character_id")
|
||||
|
||||
|
||||
def test_goal_has_type():
|
||||
"""Goal 模型新增 type 字段,默认 session。"""
|
||||
assert hasattr(Goal, "type")
|
||||
|
||||
|
||||
def test_goal_has_progress():
|
||||
"""Goal 模型新增 progress 字段,默认 0.0。"""
|
||||
goal = Goal(title="test", level="task")
|
||||
assert goal.type == "session"
|
||||
assert goal.progress == 0.0
|
||||
assert goal.character_id is None
|
||||
Reference in new issue
Block a user