Skip to content

Commit cf26e30

Browse files
committed
test: fixup prompt
1 parent b1eee8c commit cf26e30

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

models/tests/test_examples.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,17 @@ class TestExamples:
2424
@patch("argparse.ArgumentParser.parse_args")
2525
def test_prompt(self, mock_parse_args):
2626
"""Test prompt example."""
27-
mock_args = MagicMock()
28-
mock_args.system_prompt = """you are a helpful assistant. If you are prompted,
27+
system_prompt = """you are a helpful assistant. If you are prompted,
2928
'this is a test', then return the word 'SUCCESS' in upper case. Return only
3029
this single word, in upper case. Do not embellish. do not further prompt
3130
the user for any reason."""
31+
32+
mock_args = MagicMock()
33+
mock_args.system_prompt = system_prompt
3234
mock_args.human_prompt = HUMAN_MESSAGE
3335
mock_parse_args.return_value = mock_args
3436

35-
system_message = SystemMessage(content="you are a helpful assistant")
37+
system_message = SystemMessage(content=system_prompt)
3638
human_message = HumanMessage(content=HUMAN_MESSAGE)
3739
result = prompt_hrs.cached_chat_request(system_message=system_message, human_message=human_message)
3840
assert result.content == "SUCCESS"

0 commit comments

Comments
 (0)