Feat/hidden domain (#113)

Summary
新增秘境探索,属于多人活动,每N年触发一次
Closes #105
This commit is contained in:
4thfever
2026-01-31 20:43:42 +08:00
committed by GitHub
parent efa663febe
commit 0315dca6e6
34 changed files with 843 additions and 29 deletions

View File

@@ -117,7 +117,7 @@ def dummy_avatar(base_world):
return av
@pytest.fixture
@pytest.fixture(autouse=True)
def mock_llm_managers():
"""
Mock 所有涉及 LLM 调用的管理器和函数,防止测试中意外调用 LLM。
@@ -134,6 +134,7 @@ def mock_llm_managers():
patch("src.classes.relation_resolver.RelationResolver.run_batch", new_callable=AsyncMock) as mock_rr, \
patch("src.classes.history.HistoryManager.apply_history_influence", new_callable=AsyncMock) as mock_hist, \
patch("src.classes.story_teller.StoryTeller.tell_story", new_callable=AsyncMock) as mock_story, \
patch("src.classes.story_teller.StoryTeller.tell_gathering_story", new_callable=AsyncMock) as mock_gathering_story, \
patch("src.utils.llm.config.LLMConfig.from_mode", return_value=mock_llm_config) as mock_config:
mock_ai.decide = AsyncMock(return_value={})
@@ -142,6 +143,7 @@ def mock_llm_managers():
mock_rr.return_value = []
mock_hist.return_value = None
mock_story.return_value = "测试故事"
mock_gathering_story.return_value = "秘境测试故事"
yield {
"ai": mock_ai,
@@ -150,6 +152,7 @@ def mock_llm_managers():
"rr": mock_rr,
"hist": mock_hist,
"story": mock_story,
"gathering_story": mock_gathering_story,
"config": mock_config
}