refactor: update formatting in test_assistant_messages_in_history

- Enhanced the readability of the test case by reformatting the expected output and input message structures.
- This change maintains the same functionality while making the test code cleaner and easier to understand.
This commit is contained in:
Muhammad Junaid 2025-03-13 00:20:59 +05:00
parent 51d79bf141
commit c09a2258af

View file

@ -416,8 +416,11 @@ def test_assistant_messages_in_history():
] ]
) )
# OUTPUT is [{'role': 'user', 'content': 'Hello'}, {'role': 'assistant', 'content': 'Hello?'}, {'role': 'user', 'content': 'What was my Name?'}] assert messages == [
assert messages == [{'role': 'user', 'content': 'Hello'}, {'role': 'assistant', 'content': 'Hello?'}, {'role': 'user', 'content': 'What was my Name?'}] {"role": "user", "content": "Hello"},
{"role": "assistant", "content": "Hello?"},
{"role": "user", "content": "What was my Name?"},
]
assert len(messages) == 3 assert len(messages) == 3
assert messages[0]["role"] == "user" assert messages[0]["role"] == "user"
assert messages[0]["content"] == "Hello" assert messages[0]["content"] == "Hello"