22 lines
822 B
Python
22 lines
822 B
Python
|
|
"""default 路径职业提示(与 cadre/military 专属块正交)。"""
|
||
|
|
|
||
|
|
from app.agents.chat.occupation_context import (
|
||
|
|
get_occupation_chat_hint,
|
||
|
|
get_occupation_narrative_hint,
|
||
|
|
)
|
||
|
|
|
||
|
|
|
||
|
|
def test_chat_hint_only_default_with_occupation() -> None:
|
||
|
|
t = get_occupation_chat_hint("教师", "default")
|
||
|
|
assert "教师" in t
|
||
|
|
assert get_occupation_chat_hint("教师", "cadre") == ""
|
||
|
|
assert get_occupation_chat_hint("教师", "military") == ""
|
||
|
|
assert get_occupation_chat_hint(None, "default") == ""
|
||
|
|
assert get_occupation_chat_hint(" ", "default") == ""
|
||
|
|
|
||
|
|
|
||
|
|
def test_narrative_hint_only_default_with_occupation() -> None:
|
||
|
|
t = get_occupation_narrative_hint("工程师", "default")
|
||
|
|
assert "工程师" in t and "禁止" in t
|
||
|
|
assert get_occupation_narrative_hint("工程师", "military") == ""
|