Further fixes to tests
This commit is contained in:
parent
ca35b323ae
commit
18a72c09e6
1 changed files with 8 additions and 3 deletions
|
|
@ -13,8 +13,11 @@ from .llm_npc import LLMNPC
|
||||||
|
|
||||||
|
|
||||||
class TestLLMClient(BaseEvenniaTestCase):
|
class TestLLMClient(BaseEvenniaTestCase):
|
||||||
@override_settings(LLM_PROMPT_PREFIX="You are a test bot.")
|
"""
|
||||||
@patch("evennia.contrib.rpg.llm.llm_npc.task.deferLater")
|
Test the LLMNPC class.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.npc = create_object(LLMNPC, key="Test NPC")
|
self.npc = create_object(LLMNPC, key="Test NPC")
|
||||||
self.npc.db_home = None # fix a bug in test suite
|
self.npc.db_home = None # fix a bug in test suite
|
||||||
|
|
@ -24,9 +27,11 @@ class TestLLMClient(BaseEvenniaTestCase):
|
||||||
self.npc.delete()
|
self.npc.delete()
|
||||||
super().tearDown()
|
super().tearDown()
|
||||||
|
|
||||||
|
@override_settings(LLM_PROMPT_PREFIX="You are a test bot.")
|
||||||
|
@patch("evennia.contrib.rpg.llm.llm_npc.task.deferLater")
|
||||||
def test_npc_at_talked_to(self, mock_deferLater):
|
def test_npc_at_talked_to(self, mock_deferLater):
|
||||||
"""
|
"""
|
||||||
Test the LLMNPC class.
|
Test the npc's at_talked_to method.
|
||||||
"""
|
"""
|
||||||
mock_LLMClient = Mock()
|
mock_LLMClient = Mock()
|
||||||
self.npc.ndb.llm_client = mock_LLMClient
|
self.npc.ndb.llm_client = mock_LLMClient
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue