Skip to content

Commit d6d8e1e

Browse files
Copilotpatniko
andcommitted
Address code review feedback: extract greeting text to avoid duplication
Co-authored-by: patniko <26906478+patniko@users.noreply.github.com>
1 parent 7955bd8 commit d6d8e1e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/e2e/test_session.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,8 @@ async def test_should_resume_session_with_custom_provider(self, ctx: E2ETestCont
317317

318318
async def test_should_resume_session_with_system_message(self, ctx: E2ETestContext):
319319
# Create initial session with a system message
320-
system_message_suffix = "End each response with 'Greetings from the resumed session!'"
320+
greeting_text = "Greetings from the resumed session!"
321+
system_message_suffix = f"End each response with '{greeting_text}'"
321322
session = await ctx.client.create_session(
322323
{"system_message": {"mode": "append", "content": "Initial system message."}}
323324
)
@@ -335,7 +336,7 @@ async def test_should_resume_session_with_system_message(self, ctx: E2ETestConte
335336
# Send a message and verify the resumed system message is being used
336337
await session2.send({"prompt": "What is your purpose?"})
337338
assistant_message = await get_final_assistant_message(session2)
338-
assert "Greetings from the resumed session!" in assistant_message.data.content
339+
assert greeting_text in assistant_message.data.content
339340

340341
# Also validate the underlying traffic
341342
traffic = await ctx.get_exchanges()

0 commit comments

Comments
 (0)